Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce2011-10-26 21:42:51 +0000
committerShawn O. Pearce2011-10-27 03:34:52 +0000
commitb24a61272a991373857f9d165db33dbd0170f43a (patch)
tree9b51b703a1f28dc845e4cf81126bec1820bcca66
parent34f678643cb741ba215b1fa9d5d10b10df93d5d6 (diff)
downloadjgit-b24a61272a991373857f9d165db33dbd0170f43a.tar.gz
jgit-b24a61272a991373857f9d165db33dbd0170f43a.tar.xz
jgit-b24a61272a991373857f9d165db33dbd0170f43a.zip
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
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java
index 55ac999cd4..e47192bddb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/Merger.java
+++ b/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();

Back to the top