ResolveMerger: push result file creation into updateIndex()
The only caller of writeMergedFile is updateIndex, and the only user of this path object is the code within the method. This is a no-op change that opens the door to refactoring the way temp files are handled for inCore merges. Change-Id: I863a303194689a806b667e55eb958e1decf046c1
This commit is contained in:
parent
4bd28bc958
commit
2c33c725f9
|
@ -635,8 +635,7 @@ protected boolean processEntry(CanonicalTreeParser base,
|
||||||
MergeResult<RawText> result = contentMerge(base, ours, theirs);
|
MergeResult<RawText> result = contentMerge(base, ours, theirs);
|
||||||
if (ignoreConflicts)
|
if (ignoreConflicts)
|
||||||
result.setContainsConflicts(false);
|
result.setContainsConflicts(false);
|
||||||
File of = writeMergedFile(result);
|
updateIndex(base, ours, theirs, result);
|
||||||
updateIndex(base, ours, theirs, result, of);
|
|
||||||
if (result.containsConflicts() && !ignoreConflicts)
|
if (result.containsConflicts() && !ignoreConflicts)
|
||||||
unmergedPaths.add(tw.getPathString());
|
unmergedPaths.add(tw.getPathString());
|
||||||
modifiedFiles.add(tw.getPathString());
|
modifiedFiles.add(tw.getPathString());
|
||||||
|
@ -750,14 +749,14 @@ private boolean isWorktreeDirty(WorkingTreeIterator work,
|
||||||
* @param ours
|
* @param ours
|
||||||
* @param theirs
|
* @param theirs
|
||||||
* @param result
|
* @param result
|
||||||
* @param of
|
|
||||||
* @throws FileNotFoundException
|
* @throws FileNotFoundException
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
private void updateIndex(CanonicalTreeParser base,
|
private void updateIndex(CanonicalTreeParser base,
|
||||||
CanonicalTreeParser ours, CanonicalTreeParser theirs,
|
CanonicalTreeParser ours, CanonicalTreeParser theirs,
|
||||||
MergeResult<RawText> result, File of) throws FileNotFoundException,
|
MergeResult<RawText> result) throws FileNotFoundException,
|
||||||
IOException {
|
IOException {
|
||||||
|
File of = writeMergedFile(result);
|
||||||
if (result.containsConflicts()) {
|
if (result.containsConflicts()) {
|
||||||
// a conflict occurred, the file will contain conflict markers
|
// a conflict occurred, the file will contain conflict markers
|
||||||
// the index will be populated with the three stages and only the
|
// the index will be populated with the three stages and only the
|
||||||
|
|
Loading…
Reference in New Issue