fix merge tool entry not visible in the context menu#930
Conversation
Reason: When we have a conflict it means it is against the index and previously it was skipped then, which is not correct
|
@AHSauge Sorry for disturbing. Could you have a look on it? |
AHSauge
left a comment
There was a problem hiding this comment.
Aside from lacking a comment, this seems reasonable to me.
| git::Blob base = repo.lookupBlob(conflict.ancestor); | ||
| return new MergeTool(path, local, remote, base, parent); | ||
| } else { | ||
| return nullptr; |
There was a problem hiding this comment.
I assume this is correct, but for readability it would be useful to add a comment here. My one minute look at the code tells me this probably has something to do with not adding the merge tool if workdir is involved
There was a problem hiding this comment.
yes exactly. In FileContextMenu::FileContextMenu ExternalTool::create() will be called twice.
- If it is a normal commit:
- Diff from that commit to another commit (Diff Tool)
- Diff from that commit to local changes (Diff Tool)
- If workdir changes are shown
- We have only one diff, which might be also a conflicted diff where we wanna use the merge tool (Diff Tool or Merge Tool)
No trouble at all. Happy to help! Feel free to send more my way if needed. I really don't mind it. |
Thank you! |
Reason: When we have a conflict it means it is against the index and previously it was skipped then, which is not correct
fixes #929