Sublime Forum

How to create a merge conflict in order to reproduce an error message

#1

An odd error message just popped up while doing an interactive rebase. I am trying to figure out how to reproduce it for a bug report on a fresh repository, but drawing a blank. I want to be able to create merge conflict where the conflict in question is the deletion of a file in the local repository. Such that git status shows: “unmerged paths: deleted by them/us: file”.

At the moment, when I pull from my project’s remote repository I am getting a merge conflict. One of the files is a text file, and resolving the conflict works fine using Sublime Merge. The other file is a symlink which I have deleted from the local repository. The deletion was committed locally.

When I click resolve on the symlink file, I get the three panes. One empty, one with the symlink path and the central pane. As I want to delete the symlink I tell Sublime to use the hunk on the empty side and click Save and Stage. However this triggers a warning popup: “Unable to save ~/path/to/directory: No such file or directory”. The path is correct and the directory does exist.

As I am using the system git (2.29.2) I can switch to the command line, and use git rm to remove the symlink file.

I suspect this is not to do with fact that the file is a symlink, but probably with the deletion.

0 Likes

#2

I think this is a combination of the below two issues. Sublime Merge doesn’t handle resolving a deleted file correctly in the merge conflict resolution screen (causing the attempted file save; 1st issue link), but also doesn’t re-create missing folders due to how git only tracks files & not folders (2nd issue link).

0 Likes

#3

How to create a merge conflict in order to reproduce an error message

As for this question, you can create branches on the two parents of the merge commit & have SM merge again to get screenshots/error messages. (then delete those branches as you likely won’t need them afterwords)

0 Likes

#4

Thanks for the links and the help, much appreciated. I think my issue is the reverse of first you linked to.

0 Likes