{"thread":{"id":"2215","subject":"How to clone faster via ssh ?","startedAt":"2005-10-25T07:49:15Z","lastAt":"2005-10-26T02:46:58Z","messageCount":6,"participants":["Alexander Litvinov","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"10563","messageId":"200510251449.15302.lan@ac-sw.com","threadId":"2215","inReplyTo":null,"subject":"How to clone faster via ssh ?","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-10-25T07:49:15Z","receivedAt":"2005-10-25T07:49:15Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"Hello,\n\nI have cvs project imported into git. When unpacked it contains about 205000 \nobjects. I have made one pack and daily rerun cvsimport to get new changes.\n\nWhen I do cloning via http it takes less than 3 minutes:\ntime git-clone -n http://127.0.0.1:8080/git/r/.git r2\nreal    2m31.062s\nuser    1m33.562s\nsys     0m5.462s\n\nWhen I do cloning via ssh it takes more than 10 minutes and horde of unpacked \nobjects:\nPacking 204607 objects\nUnpacking 204607 objects\n 100% (204607/204607) done\n\nreal    13m41.510s\nuser    1m52.655s\nsys     1m5.057s\n\nThere are no packs in cloned repo:\nls -la r3/.git/objects/pack/\ntotal 6\ndrwxr-xr-x    2 lan users   48 Oct 25 13:51 .\ndrwxr-xr-x  260 lan users 6240 Oct 25 14:05 ..\nlan@lan:~/tmp/git/billing\n\nWe can't share our project via http - we need authorization for it. Is is \npossible to clone this repo via ssh as http clone does ? Its will be much \nfaster and will simplify work with such directory - it is hard to delete it \nafter cloning - takes from 5 up to 10 minutes ! Filesystem is reiserfs.\n\nThanks for help,\nAlexander Litvinov.\n"},{"id":"10564","messageId":"200510251454.35202.lan@ac-sw.com","threadId":"2215","inReplyTo":"200510251449.15302.lan@ac-sw.com","subject":"Re: How to clone faster via ssh ?","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-10-25T07:54:35Z","receivedAt":"2005-10-25T07:54:35Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"Forgot to tell:\nclone via ssh was made using this command:\ntime git-clone -n ssh://lan@lan/home/lan/tmp/git/billing/repo r3\n> When I do cloning via ssh it takes more than 10 minutes and horde of\n> unpacked objects:\n> Packing 204607 objects\n> Unpacking 204607 objects\n>  100% (204607/204607) done\n>\n> real    13m41.510s\n> user    1m52.655s\n> sys     1m5.057s\n"},{"id":"10569","messageId":"Pine.LNX.4.63.0510251103110.24174@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"2215","inReplyTo":"200510251454.35202.lan@ac-sw.com","subject":"Re: How to clone faster via ssh ?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2005-10-25T09:04:33Z","receivedAt":"2005-10-25T09:04:33Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 25 Oct 2005, Alexander Litvinov wrote:\n\n> Forgot to tell:\n> clone via ssh was made using this command:\n> time git-clone -n ssh://lan@lan/home/lan/tmp/git/billing/repo r3\n\nIf you have a working git on the other side, you could do\n\n\ttime git-clone lan@lan:/home/lan/tmp/git/billing/repo r3\n\nwhich would utilize git-clone-pack. Way faster.\n\nCiao,\nDscho\n"},{"id":"10574","messageId":"200510251830.24550.lan@ac-sw.com","threadId":"2215","inReplyTo":"Pine.LNX.4.63.0510251103110.24174@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: How to clone faster via ssh ?","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-10-25T11:30:24Z","receivedAt":"2005-10-25T11:30:24Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"> If you have a working git on the other side, you could do\n>\n> \ttime git-clone lan@lan:/home/lan/tmp/git/billing/repo r3\n>\n> which would utilize git-clone-pack. Way faster.\n\nI have tried this command:\nlan@lan> time git-clone lan@lan:/home/lan/tmp/git/billing/repo r3\ndefaulting to local storage area\nlan@lan's password:\nPacking 204607 objects\nUnpacking 204607 objects\nKilled by signal 2.) done\n\nreal    4m0.874s\nuser    0m0.013s\nsys     0m0.120s\n\nI have killed it at ~ 20%. As I understand it does exactly what ssh git thru \nssh transport does: git-rev-list |  git-pack | ssh | git-unpack or something \nlike this. So it is not faster.\n"},{"id":"10592","messageId":"7vbr1dh5y7.fsf@assigned-by-dhcp.cox.net","threadId":"2215","inReplyTo":"Pine.LNX.4.63.0510251103110.24174@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: How to clone faster via ssh ?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-10-25T17:17:20Z","receivedAt":"2005-10-25T17:17:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Tue, 25 Oct 2005, Alexander Litvinov wrote:\n>\n>> Forgot to tell:\n>> clone via ssh was made using this command:\n>> time git-clone -n ssh://lan@lan/home/lan/tmp/git/billing/repo r3\n>\n> If you have a working git on the other side, you could do\n>\n> \ttime git-clone lan@lan:/home/lan/tmp/git/billing/repo r3\n>\n> which would utilize git-clone-pack. Way faster.\n\nI think both of these notations do the same.\n\nThe time to unpack the resulting pack on this end is eliminated\nif you use git from last week, namely this commit:\n\ncommit e1c7ada6dd1fdf249d0bb84f3293d3be768b9239\nAuthor: Junio C Hamano <junkio@cox.net>\nDate:   Wed Oct 19 14:43:43 2005 -0700\n\n    git-clone: always keep pack sent from remote.\n\n    This deprecates --keep and -q flags and always keeps the\n    pack\n    sent from the remote site.  Corresponding configuration\n    variables are also removed.\n\n    Signed-off-by: Junio C Hamano <junkio@cox.net>\n\nBut you would still pay for creating a pack on the remote side.\n"},{"id":"10635","messageId":"200510260946.58443.lan@ac-sw.com","threadId":"2215","inReplyTo":"7vbr1dh5y7.fsf@assigned-by-dhcp.cox.net","subject":"Re: How to clone faster via ssh ?","fromName":"Alexander Litvinov","fromEmail":"lan@ac-sw.com","sentAt":"2005-10-26T02:46:58Z","receivedAt":"2005-10-26T02:46:58Z","isPatch":false,"sender":{"key":"lan@ac-sw.com","avatar":null},"body":"> The time to unpack the resulting pack on this end is eliminated\n> if you use git from last week, namely this commit:\n>\n> commit e1c7ada6dd1fdf249d0bb84f3293d3be768b9239\n> Author: Junio C Hamano <junkio@cox.net>\n> Date:   Wed Oct 19 14:43:43 2005 -0700\n>\n>     git-clone: always keep pack sent from remote.\n>\n>     This deprecates --keep and -q flags and always keeps the\n>     pack\n>     sent from the remote site.  Corresponding configuration\n>     variables are also removed.\n>\n>     Signed-off-by: Junio C Hamano <junkio@cox.net>\n>\n> But you would still pay for creating a pack on the remote side.\n\nYeah ! Thanks.\n\nVersion for todays master branch works much faster:\nlan@lan:~/tmp/git/billing> time git-clone -n \nssh://lan@lan/home/lan/tmp/git/billing/repo r1\ndefaulting to local storage area\nlan@lan's password:\nPacking 204607 objects\n\nreal    4m0.107s\nuser    0m11.879s\nsys     0m1.717s\n\nAnd it makes only one pack. Great.\n"}]}