Open ydanila opened 2 years ago
This is a https://github.com/libgit2/libgit2 feature. This is by-design - we store both sides of a rename conflict so that you can identify what happened in a merge after the fact. (git just spits out information to stdout, which is not particularly helpful if you're trying to drive it programmatically.)
I was reminded of this the other day. I had hoped that merge-ort would address this in git, but I don't think that it did. If it didn't, then we should make our behavior opt-in or opt-out and allow you to match git's retched behavior.
The problem here that merge can have more than one such conflict and they don't have common ancestor so I can't filter out and group such values together.
This should work via manually rename tracking for second conflict to find common ancestor?
Reproduction steps
Pull changes from 'main' using this code
Expected behavior
As mergeOptions.FindRenames == true it returns one conflict which has Ancestor==Readme.md, Ours==Readme2.md and Theirs==null (file deleted)
Actual behavior
It returns two conflicts. First: Second:
Version of LibGit2Sharp (release number or SHA1)
Latest: 4daf6189b0e20f878348b262d1846eb25bc6d7f6
Operating system(s) tested; .NET runtime tested
Windows .Net Fw 4.7.2