Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate the behaviour of Git merge for simple renaming / movement of files with minor editing on one branch and outright deletion on the other. #4

Open
sageserpent-open opened this issue May 17, 2023 · 0 comments
Labels
minimum viable product Contributing to the simplest thing that is useful when it is shipped

Comments

@sageserpent-open
Copy link
Owner

This is similar to #3 , only this time the file is completed deleted on one branch - but is still renamed and / or moved on the other, possibly with some minor editing.

This is handled by git merge nicely:

  1. For a conflict between a renamed / moved file without edits and a deletion, it writes a stage entry for 'our' version of the file only. git status --porcelain says AU for the renamed / moved file.
  2. For a conflict between an edited and renamed / moved file and a deletion, it writes stage entries for the common base form of the file, 'our' version of the file, but leaves the conflicting deletion implied as there is neither a path nor any content for the deleted form. git status --porcelain says UD for the renamed / moved file.

Out of scope for this is what happens when a file split on one branch (possibly with edits in either part) and deleted outright on another. That is for another story.

@sageserpent-open sageserpent-open added the minimum viable product Contributing to the simplest thing that is useful when it is shipped label May 17, 2023
sageserpent-open added a commit that referenced this issue May 18, 2024
…ughAFileCondensation` - need #4 to allow this commit to be reverted.
sageserpent-open added a commit that referenced this issue May 20, 2024
…tingThroughAFileCondensation` - need #4 to allow this commit to be reverted."

This reverts commit d5df1eb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minimum viable product Contributing to the simplest thing that is useful when it is shipped
Projects
None yet
Development

No branches or pull requests

1 participant