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);
|
add(tw.getRawPath(), theirs, DirCacheEntry.STAGE_3, EPOCH, 0);
|
||||||
|
|
||||||
if (gitlinkConflict) {
|
if (gitlinkConflict) {
|
||||||
MergeResult<SubmoduleConflict> result = new MergeResult<>(
|
MergeResult<SubmoduleConflict> result = createGitLinksMergeResult(
|
||||||
Arrays.asList(
|
base, ours, theirs);
|
||||||
new SubmoduleConflict(base == null ? null
|
|
||||||
: base.getEntryObjectId()),
|
|
||||||
new SubmoduleConflict(ours == null ? null
|
|
||||||
: ours.getEntryObjectId()),
|
|
||||||
new SubmoduleConflict(theirs == null ? null
|
|
||||||
: theirs.getEntryObjectId())));
|
|
||||||
result.setContainsConflicts(true);
|
result.setContainsConflicts(true);
|
||||||
mergeResults.put(tw.getPathString(), result);
|
mergeResults.put(tw.getPathString(), result);
|
||||||
if (!ignoreConflicts) {
|
if (!ignoreConflicts) {
|
||||||
|
@ -825,6 +819,18 @@ protected boolean processEntry(CanonicalTreeParser base,
|
||||||
return true;
|
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
|
* Does the content merge. The three texts base, ours and theirs are
|
||||||
* specified with {@link CanonicalTreeParser}. If any of the parsers is
|
* specified with {@link CanonicalTreeParser}. If any of the parsers is
|
||||||
|
|
Loading…
Reference in New Issue