diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2012-06-14 18:43:40 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2012-06-14 18:43:52 -0700 |
commit | b3dbf1981b8a0937253ef197d32921a4bc254bb2 (patch) | |
tree | bd38cc50e3ca6a82fc23668009d382cc4b7e4b5b /org.eclipse.jgit/src/org/eclipse/jgit/merge | |
parent | 90f984c71f719310153a9f42bc35a2b9ca81f131 (diff) | |
download | jgit-b3dbf1981b8a0937253ef197d32921a4bc254bb2.tar.gz jgit-b3dbf1981b8a0937253ef197d32921a4bc254bb2.zip |
Use only a single ObjectInserter in ResolveMerger
The base class supplies an ObjectInserter to its implementations
by way of the getObjectInserter method. Tracking a second inserter
instance doesn't match with the expected behavior.
Change-Id: I78996bd06ef9028c8aa2e4e192ff647c43da847d
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/merge')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java index 2c1aa6fbf7..588d4b95b0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -131,8 +131,6 @@ public class ResolveMerger extends ThreeWayMerger { private Map<String, MergeFailureReason> failingPaths = new HashMap<String, MergeFailureReason>(); - private ObjectInserter oi; - private boolean enterSubtree; private boolean inCore; @@ -155,7 +153,6 @@ public class ResolveMerger extends ThreeWayMerger { SupportedAlgorithm.HISTOGRAM); mergeAlgorithm = new MergeAlgorithm(DiffAlgorithm.getAlgorithm(diffAlg)); commitNames = new String[] { "BASE", "OURS", "THEIRS" }; - oi = getObjectInserter(); this.inCore = inCore; if (inCore) { @@ -226,7 +223,7 @@ public class ResolveMerger extends ThreeWayMerger { } if (getUnmergedPaths().isEmpty()) { - resultTree = dircache.writeTree(oi); + resultTree = dircache.writeTree(getObjectInserter()); return true; } else { resultTree = null; @@ -624,7 +621,8 @@ public class ResolveMerger extends ThreeWayMerger { dce.setLength((int) of.length()); InputStream is = new FileInputStream(of); try { - dce.setObjectId(oi.insert(Constants.OBJ_BLOB, of.length(), is)); + dce.setObjectId(getObjectInserter().insert( + Constants.OBJ_BLOB, of.length(), is)); } finally { is.close(); if (inCore) |