Browse Source

Rename method to ResolveMerger.setWorkingTreeIterator()

renamed an ugly methodname

Change-Id: I26bda06ef64b8644fd3a555dc55dff43cdb56a71
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
stable-0.10
Christian Halstrick 14 years ago
parent
commit
fb1e500adc
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
  2. 14
      org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java

2
org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java

@ -176,7 +176,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
ResolveMerger resolveMerger = (ResolveMerger) merger; ResolveMerger resolveMerger = (ResolveMerger) merger;
resolveMerger.setCommitNames(new String[] { resolveMerger.setCommitNames(new String[] {
"BASE", "HEAD", ref.getName() }); "BASE", "HEAD", ref.getName() });
resolveMerger.setWorkingTreeIt(new FileTreeIterator(repo)); resolveMerger.setWorkingTreeIterator(new FileTreeIterator(repo));
noProblems = merger.merge(headCommit, srcCommit); noProblems = merger.merge(headCommit, srcCommit);
lowLevelResults = resolveMerger lowLevelResults = resolveMerger
.getMergeResults(); .getMergeResults();

14
org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java

@ -132,7 +132,7 @@ public class ResolveMerger extends ThreeWayMerger {
private DirCache dircache; private DirCache dircache;
private WorkingTreeIterator workingTreeIt; private WorkingTreeIterator workingTreeIterator;
/** /**
@ -176,8 +176,8 @@ public class ResolveMerger extends ThreeWayMerger {
tw.addTree(sourceTrees[0]); tw.addTree(sourceTrees[0]);
tw.addTree(sourceTrees[1]); tw.addTree(sourceTrees[1]);
tw.addTree(buildIt); tw.addTree(buildIt);
if (workingTreeIt != null) if (workingTreeIterator != null)
tw.addTree(workingTreeIt); tw.addTree(workingTreeIterator);
while (tw.next()) { while (tw.next()) {
if (!processEntry( if (!processEntry(
@ -185,7 +185,7 @@ public class ResolveMerger extends ThreeWayMerger {
tw.getTree(T_OURS, CanonicalTreeParser.class), tw.getTree(T_OURS, CanonicalTreeParser.class),
tw.getTree(T_THEIRS, CanonicalTreeParser.class), tw.getTree(T_THEIRS, CanonicalTreeParser.class),
tw.getTree(T_INDEX, DirCacheBuildIterator.class), tw.getTree(T_INDEX, DirCacheBuildIterator.class),
(workingTreeIt == null) ? null : tw.getTree(T_FILE, WorkingTreeIterator.class))) { (workingTreeIterator == null) ? null : tw.getTree(T_FILE, WorkingTreeIterator.class))) {
cleanUp(); cleanUp();
return false; return false;
} }
@ -612,10 +612,10 @@ public class ResolveMerger extends ThreeWayMerger {
* TODO: enhance WorkingTreeIterator to support write operations. Then this * TODO: enhance WorkingTreeIterator to support write operations. Then this
* merger will be able to merge with a different working tree abstraction. * merger will be able to merge with a different working tree abstraction.
* *
* @param workingTreeIt * @param workingTreeIterator
* the workingTreeIt to set * the workingTreeIt to set
*/ */
public void setWorkingTreeIt(WorkingTreeIterator workingTreeIt) { public void setWorkingTreeIterator(WorkingTreeIterator workingTreeIterator) {
this.workingTreeIt = workingTreeIt; this.workingTreeIterator = workingTreeIterator;
} }
} }

Loading…
Cancel
Save