Skip to content

Commit

Permalink
fix(index): ensure we only report added vs added conflict if...
Browse files Browse the repository at this point in the history
...there are conflicts among the tracked fields of a document
  • Loading branch information
cmark committed Oct 12, 2023
1 parent 6a2cd0f commit 0ec9756
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,8 @@ private void collectConflicts(RevisionBranchChangeSet fromChangeSet, List<Revisi
Revision addedOnTargetObject = addedRevisionsOnTarget.get(revisionId);

RevisionDiff diff = new RevisionDiff(addedOnTargetObject, addedOnSourceObject);
if (diff.hasChanges()) {
// check the tracked field diff, not the raw diff
if (diff.diff().hasChanges()) {
conflicts.add(new AddedInSourceAndTargetConflict(ObjectId.of(type, revisionId)));
} else {
// ensure we revise the one coming from source (or target?)
Expand Down

0 comments on commit 0ec9756

Please sign in to comment.