summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2016-02-10 00:44:58 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2016-02-10 00:45:18 +0100
commit26012958a35d85639fe44fdbd4690cb58ec3b836 (patch)
tree8a4f43a6f0d0491a281cb1d21291194f0b71b860 /org.eclipse.jgit
parent4e5255c59a6e26975bb95fa35a85ae2563fb0769 (diff)
parentdf904a4227360741635bf7aa6a6ad5e39057b343 (diff)
downloadjgit-26012958a35d85639fe44fdbd4690cb58ec3b836.tar.gz
jgit-26012958a35d85639fe44fdbd4690cb58ec3b836.zip
Merge branch 'stable-4.1' into stable-4.2
* stable-4.1: Fix diff for added and removed submodule Change-Id: I37dd71ed19b06e9bbcffe37370081ab875c6d8d4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
index 4c0ed386e8..fc701f3a54 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
@@ -666,6 +666,9 @@ public class DiffFormatter implements AutoCloseable {
}
private static byte[] writeGitLinkText(AbbreviatedObjectId id) {
+ if (id.toObjectId().equals(ObjectId.zeroId())) {
+ return EMPTY;
+ }
return encodeASCII("Subproject commit " + id.name() //$NON-NLS-1$
+ "\n"); //$NON-NLS-1$
}