ResolveMerger: extracting createGitLinksMergeResult method
Signed-off-by: Demetr Starshov <dstarshov@google.com> Change-Id: Ibc8b954266b1b4b9b9f404e3433f0d7cdae107e8
This commit is contained in:
parent
e60ea7324f
commit
3da7ea50a9
|
@ -745,14 +745,8 @@ protected boolean processEntry(CanonicalTreeParser base,
|
|||
add(tw.getRawPath(), theirs, DirCacheEntry.STAGE_3, EPOCH, 0);
|
||||
|
||||
if (gitlinkConflict) {
|
||||
MergeResult<SubmoduleConflict> result = new MergeResult<>(
|
||||
Arrays.asList(
|
||||
new SubmoduleConflict(base == null ? null
|
||||
: base.getEntryObjectId()),
|
||||
new SubmoduleConflict(ours == null ? null
|
||||
: ours.getEntryObjectId()),
|
||||
new SubmoduleConflict(theirs == null ? null
|
||||
: theirs.getEntryObjectId())));
|
||||
MergeResult<SubmoduleConflict> result = createGitLinksMergeResult(
|
||||
base, ours, theirs);
|
||||
result.setContainsConflicts(true);
|
||||
mergeResults.put(tw.getPathString(), result);
|
||||
if (!ignoreConflicts) {
|
||||
|
@ -825,6 +819,18 @@ protected boolean processEntry(CanonicalTreeParser base,
|
|||
return true;
|
||||
}
|
||||
|
||||
private MergeResult<SubmoduleConflict> createGitLinksMergeResult(
|
||||
CanonicalTreeParser base, CanonicalTreeParser ours,
|
||||
CanonicalTreeParser theirs) {
|
||||
return new MergeResult<>(Arrays.asList(
|
||||
new SubmoduleConflict(
|
||||
base == null ? null : base.getEntryObjectId()),
|
||||
new SubmoduleConflict(
|
||||
ours == null ? null : ours.getEntryObjectId()),
|
||||
new SubmoduleConflict(
|
||||
theirs == null ? null : theirs.getEntryObjectId())));
|
||||
}
|
||||
|
||||
/**
|
||||
* Does the content merge. The three texts base, ours and theirs are
|
||||
* specified with {@link CanonicalTreeParser}. If any of the parsers is
|
||||
|
|
Loading…
Reference in New Issue