]> source.dussan.org Git - jgit.git/commit
Throw AmbiguousObjectException during resolve if its ambiguous 03/1403/3
authorShawn O. Pearce <spearce@spearce.org>
Tue, 24 Aug 2010 23:26:40 +0000 (16:26 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Thu, 26 Aug 2010 00:07:12 +0000 (17:07 -0700)
commit401d3b2cc1dc91cd457f0ff8d9149aca50466426
treec2ea42d92c30c3c10b75606782cc11db52fd5f54
parentc44495fa2f6ac0b06dc974d1b6626cf52380ea2c
Throw AmbiguousObjectException during resolve if its ambiguous

Its wrong to return null if we are resolving an abbreviation and we
have proven it matches more than one object.  We know how to resolve
it if we had more nybbles, as there are two or more objects with the
same prefix.  Declare that to the caller quite clearly by giving them
an AmbiguousObjectException.

Change-Id: I01bb48e587e6d001b93da8575c2c81af3eda5a32
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/lib/Repository.java