desktop: Merge hint count doesn't match actual conflicted files
The merge hint indicated there will be more conflicted files than what was showed in the actual merge conflict modal.
From four to three:

Reproduction may be difficult.
In command line:
Unmerged paths:
(use "git add <file>..." to mark resolution)
both added: UnitTestProject1/UnitTestProject1.sln
both added: UnitTestProject1/UnitTestProject1/Properties/AssemblyInfo.cs
both added: UnitTestProject1/UnitTestProject1/UnitTestProject1.csproj
tested in 1.5.0-beta3, mac
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (17 by maintainers)
In working through the equivalent feature for the rebase flow I’ve stumbled upon an escape hatch that might mean we don’t need all that complexity from the proposed fix.
I’m currently testing the use of a worktree in a temporary directory to perform the merge . This means we could update the working directory using the exact same merge steps we use in the app, avoiding the need to use
git merge-treeand then trying to cobble together the missing information thatgit merge-treeoverlooks.Based on my testing of #7445 I think the learnings and tools from there could be reused here. Stay tuned.
A theory that I’d like to unpack and explore (given a couple more real examples that I can test against) would be to test in two stages:
git merge-treeto find files that have been modified in both branches and cannot be merged automagicallygit diff-tree [merge-base]..[branch]for the base branch and the compare branch and filter on paths that will trigger the sort of conflict thatblegh-testshows.Why
git diff-tree? This is a convenient way to see which paths have been changed on each branch, and shows the relevant context I think I need here:Here’s the output for the previous merge scenario:
We see that each branch has made changes to the same two entries:
README.mdis modified in one branch but deleted in the other - I think that’s the detail I’m missingasuperlongfilenamethatnoonewouldeveruseexceptmaybetheywould.mdis added in both with the same blob - if these differed content-wise I believegit merge-treewould try and merge the content and provide this detail tostdout.