|
|
Subscribe / Log in / New account

Git vs Rsync

Git vs Rsync

Posted Jul 12, 2018 10:18 UTC (Thu) by moltonel (guest, #45207)
Parent article: Signing and distributing Gentoo

Another major difference is that `git pull` succeeds either completely or not at all, which can be a show-stopper when the repo is big and the connection is not so great.

I'm experiencing this first-hand right now: after 45min of failed attempts, I still didn't manage to update `/usr/portage` at all. With rsync (which I was using to `emerge --sync` until very recently) it doesn't throw away partial downloads between attempts, and eventually suceededs.


to post comments

Git vs Rsync

Posted Jul 12, 2018 11:01 UTC (Thu) by epa (subscriber, #39769) [Link] (3 responses)

That's unfortunate, because in principle git ought to be able to suck down individual objects, and as long as they're not garbage collected in the meantime, a later 'git pull' can use them. (You'd still be stuck if one single object were so big it timed out.)

Git vs Rsync

Posted Jul 12, 2018 13:28 UTC (Thu) by grawity (subscriber, #80596) [Link] (2 responses)

AFAIK, that was initially disallowed as a cheap way to prevent someone from fetching unreferenced objects (e.g. after you push something sensitive, then force-push to undo it, but before you can run a garbage collection on the server).

But it'll be possible eventually (I'm guessing in 2.19 or 2.20); grep the commit log of git.git for "promisor objects".

Git vs Rsync

Posted Jul 16, 2018 7:39 UTC (Mon) by epa (subscriber, #39769) [Link] (1 responses)

But even now, a single 'git pull' must surely download the objects it needs one by one. If the command is aborted or times out, all it needs to do is to make sure the objects it pulled so far are saved, so they need not be fetched again next time. Or does the on-wire format make this difficult?

Git vs Rsync

Posted Jul 16, 2018 20:04 UTC (Mon) by johill (subscriber, #25196) [Link]

It doesn't download one by one, it downloads a pack file with (roughly?) the objects it needs. I think you probably could recover partial packfiles, but haven't checked now. See http://repo.or.cz/w/git.git?a=blob;f=Documentation/techni....

Git vs Rsync

Posted Jul 17, 2018 11:26 UTC (Tue) by jond (subscriber, #37669) [Link]

I use rsync to update my git repos from sourceforge, precisely because it seems very unreliable and slow to clone from sourceforge, for some reason.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds