I have configured vimdiff
as mergetool for git. Whenever i do a merge, git never asks wether the merge was successful. I also tried:
git config --global mergetool.vimdiff.trustExitCode false
with no difference. Still no question after i leave vimdiff with :wqa
and i have to manually remove stale *.orig
files.
Maybe related: When i display config settings trustExitCode
is not displayed with camelcase anymore:
git config --global -l
core.editor=vim
core.autocrlf=input
merge.tool=vimdiff
alias.co=checkout
alias.st=status
color.diff=auto
color.status=auto
color.branch=auto
mergetool.vimdiff.trustexitcode=false
How can this be fixed?
I know this is an old question, but I just ran into the same issue.
The part about manually removing stale backup files can be fixed with:
git config --global mergetool.vimdiff.keepBackup false
I think other problem is that trustExitCode
doesn't do what you think it does:
mergetool.<tool>.trustExitCode
For a custom merge command, specify whether the exit code of the merge command can be used to determine whether the merge was successful. If this is not set to true then the merge target file timestamp is checked and the merge assumed to have been successful if the file has been updated, otherwise the user is prompted to indicate the success of the merge.
So, even with this option set to false, it will only prompt you if the file hasn't been changed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With