Reputation: 30156
I'm trying to find merge revisions on projects that had conflicts in the past. Is there an easier way to do it than to replicate the merge by hand? Because I haven't been able to find a way to make git show
list only the files where there were conflicts (if any).
Upvotes: 3
Views: 254
Reputation: 487725
It's not possible in general.
The only reliable method is to repeat the merge, and even then, you must know several things that are not knowable from the repository itself. In particular, you must know:
-X find-renames
, if there was any such argument-X ours
or -X theirs
was supplied-s
, if there was any such argumentSince most merges don't use these arguments, you can get pretty close by repeating the merge, and that's far easier than any alternative. (If you have git worktree add
or are willing to make a clone, it's easy to automate.)
(It would be nice if git merge
stashed these merge arguments as a comment in a header line in the merge commit. Git would have to save them in a file for merges that stop in the middle, but that is obviously possible.)
Upvotes: 4