]> source.dussan.org Git - jgit.git/commitdiff
Correct ObjectWalk error message when bad object is found 57/257/1
authorShawn O. Pearce <spearce@spearce.org>
Tue, 2 Feb 2010 18:49:32 +0000 (10:49 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 2 Feb 2010 18:49:36 +0000 (10:49 -0800)
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>
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java

index b1796b258a3eb383da19791dff5e0590038e39ac..69045859300c064a71d49229be8889c97545674b 100644 (file)
@@ -283,9 +283,9 @@ public class ObjectWalk extends RevWalk {
                                        break;
                                treeWalk.getEntryObjectId(idBuffer);
                                throw new CorruptObjectException("Invalid mode " + mode
-                                               + " for " + idBuffer.name() + " "
-                                               + treeWalk.getEntryPathString() + " in " + currentTree
-                                               + ".");
+                                               + " for " + idBuffer.name() + " '"
+                                               + treeWalk.getEntryPathString() + "' in "
+                                               + currentTree.name() + ".");
                        }
 
                        treeWalk = treeWalk.next();