]> source.dussan.org Git - jgit.git/commit
Fix ObjectDirectory abbreviation resolution to notice new packs 06/1406/1
authorShawn O. Pearce <spearce@spearce.org>
Wed, 25 Aug 2010 00:20:50 +0000 (17:20 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Wed, 25 Aug 2010 00:37:07 +0000 (17:37 -0700)
commit1c3f3fdbd237f1f344c8ea081a47c698f47a0de6
treed13e83bae08f605b8a51e580021dd19a664a1944
parenta5c18fcfc7929f91c6aa4a4314d28d0f924aad46
Fix ObjectDirectory abbreviation resolution to notice new packs

If we can't resolve an abbreviation, it might be because there is
a new pack file we haven't picked up yet.  Try scanning the packs
again and recheck each pack if there were differences from the last
scan we did.

Because of this, we don't have to open a pack during the test where
we generate a pack on the fly.  We'll miss on the first loop during
which the PackList is the NO_PACKS magic initialization constant,
and pick up the newly created index during this retry logic.

Change-Id: I7b97efb29a695ee60c90818be380f7ea23ad13a3
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/AbbreviationTest.java
org.eclipse.jgit/src/org/eclipse/jgit/storage/file/ObjectDirectory.java