Browse Source

Ensure the ObjectInserter flushes after a merge

If this does not happen some databases may discard
objects and not make them available.

Change-Id: I347b3c3724db52c8a6c09f4804071497a3a377ab
stable-1.2
Shawn O. Pearce 13 years ago
parent
commit
b24a61272a
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java

5
org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java

@ -153,7 +153,10 @@ public abstract class Merger {
sourceTrees[i] = walk.parseTree(sourceObjects[i]);
try {
return mergeImpl();
boolean ok = mergeImpl();
if (ok && inserter != null)
inserter.flush();
return ok;
} finally {
if (inserter != null)
inserter.release();

Loading…
Cancel
Save