diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java index 2d4279ebc..a7db92aa0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java @@ -1396,10 +1396,10 @@ public class PackWriter { otp.setCRC(out.getCRC32()); } - private void writeBase(PackOutputStream out, ObjectToPack baseInPack) + private void writeBase(PackOutputStream out, ObjectToPack base) throws IOException { - if (baseInPack != null && !baseInPack.isWritten()) - writeObjectImpl(out, baseInPack); + if (base != null && !base.isWritten() && !base.isEdge()) + writeObjectImpl(out, base); } private void writeWholeObjectDeflate(PackOutputStream out,