Skip to content

Handle rename conflicts in merge requests

Renames from a name (on branch conflict-a: git mv a b, on branch conflict-b: git mv a c)

The git CLI shows:

Unmerged paths:
	added by them:   b
	added by us:     c
	both deleted:    a

To have this detected by Rugged, we need to pass renames: true when merging. However, we need to ensure that we do so everywhere when merging, not just when generating an index for resolving conflicts: otherwise we won't be consistent in displaying whether there are conflicts or not.

Renames to a name (on branch conflict-a: git mv a b, on branch conflict-b git mv c b)

The git CLI shows:

Changes to be committed:
	deleted:    a

Untracked files:
        b~HEAD
	b~conflict-a

Rugged stages the deletion (like the git CLI) and shows the conflict as just a 'regular' conflict in the file b.

Edited by Sean McGivern