As part of writing extra tests for #2705, I found that git_status_file() returns GIT_STATUS_WT_NEW | GIT_STATUS_INDEX_DELETED for unmerged paths e.g. for what in this case:
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: who
Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)
both modified: what
Untracked files:
(use "git add <file>..." to include in what will be committed)
when
$ cat what
<<<<<<< ours
ciao
=======
goodbye
>>>>>>> theirs
Some questions:
- Is this the expected behavior or a bug / unsupported case?
- What's the proper why of detecting that a file is in an unmerged state in the workdir?
As part of writing extra tests for #2705, I found that
git_status_file()returnsGIT_STATUS_WT_NEW | GIT_STATUS_INDEX_DELETEDfor unmerged paths e.g. forwhatin this case:Some questions: