Re: rsync deprecated but promoted?
- From
Petr Baudis <pasky@suse.cz>
- Date
- Nov 10, 2005, 23:17 UTC
- Message-ID
- <20051110231704.GB30496@pasky.or.cz>
- In-Reply-To
- <Pine.LNX.4.58.0509260941340.3308@g5.osdl.org>
Dear diary, on Mon, Sep 26, 2005 at 06:43:08PM CEST, I got a letter where Linus Torvalds <torvalds@osdl.org> said that...
Show 19 quoted lines
> > > On Mon, 26 Sep 2005, Petr Baudis wrote: > > > > Actually, it would be nice to be able to tell git-fsck-objects to only > > verify objects which are referenced between given two commits (perhaps > > just make it support the ^object notation). Then I wouldn't mind running > > that after each rsync fetch in Cogito. > > You can kind of do it. > > Do > > git-rev-list --objects $oldheads --not $newheads >& /dev/null > echo "$?" > > and it _should_ largely work. Untested, of course, but I _hope_ that if > any object is missing, git-rev-list should die with an error. And if it > doesn't, I should fix it ;)
It should obviously be
git-rev-list $(git-rev-parse $newheads --not $oldheads) >& /dev/null
but it is indeed broken:
$ git-rev-list --objects ... ^... && echo ':)' 001439c6a797461c3e75018d95744d463077ae33 841e3297d8df764da417da81dbfe1044e24d4082 cf11a3d561e76c8ba273cb0bb62d46a4b2959c1f file :) $ git-cat-file -t cf11a3d561e76c8ba273cb0bb62d46a4b2959c1f error: unable to find cf11a3d561e76c8ba273cb0bb62d46a4b2959c1f fatal: git-cat-file cf11a3d561e76c8ba273cb0bb62d46a4b2959c1f: bad file
Currently I just modified it so that I iterate through all the sha1s git-rev-list spits out, and test them by git-cat-file -t.
Thanks for the hint,
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ VI has two modes: the one in which it beeps and the one in which it doesn't.