On Sun, Oct 02, 2016 at 11:07:39AM +0200, René Scharfe wrote: > Am 30.09.2016 um 21:36 schrieb Jeff King: > > We adjust the test script here to demonstrate that this now > > works. Unfortunately, we can't demonstrate that the > > duplicate is suppressed, since it has no user-visible > > behavior (it's just one less place for our object lookups to > > go). But you can verify it manually via gdb, with something > > like: > > > > for i in a b c; do > > git init --bare $i > > blob=$(echo $i | git -C $i hash-object -w --stdin) > > done > > echo "../../b/objects" >a/objects/info/alternates > > echo "../../c/objects" >>a/objects/info/alternates > > echo "../../c/objects" >b/objects/info/alternates > > gdb --args git cat-file -e $blob > > > > After prepare_alt_odb() runs, we have only a single copy of > > "/path/to/c/objects/" in the alt_odb list. > > A better way would be to provide a UI for that. We could easily bolt > it to the side of count-objects like in the patch below. Feels a bit > hackish, though. Yeah, I thought about something like that, but I'm a bit hesitant to add public interfaces that exist just for testing. OTOH, "count-objects --list-alternates" is conceivably a useful debugging tool for "did I set up my alternates correctly?". -Peff