Correct ObjectWalk error message when bad object is found

Instead of including "ObjectId[SHA-1]" in the message, just
us the formatted SHA-1 name of the object by calling name().

Change-Id: I0d1d0e8207f8a3f02188e60242e4e9bf7420e88f
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2010-02-02 10:49:32 -08:00
parent 784b24dde1
commit 986d616ed4
1 changed files with 3 additions and 3 deletions

View File

@ -283,9 +283,9 @@ public RevObject nextObject() throws MissingObjectException,
break; break;
treeWalk.getEntryObjectId(idBuffer); treeWalk.getEntryObjectId(idBuffer);
throw new CorruptObjectException("Invalid mode " + mode throw new CorruptObjectException("Invalid mode " + mode
+ " for " + idBuffer.name() + " " + " for " + idBuffer.name() + " '"
+ treeWalk.getEntryPathString() + " in " + currentTree + treeWalk.getEntryPathString() + "' in "
+ "."); + currentTree.name() + ".");
} }
treeWalk = treeWalk.next(); treeWalk = treeWalk.next();