Skip to content

Commit 2967284

Browse files
davvidgitster
authored andcommitted
mergetools/vimdiff: trust Vim's exit code
Allow vimdiff users to signal that they do not want to use the result of a merge by exiting with ":cquit", which tells Vim to exit with an error code. This is better than the current behavior because it allows users to directly flag that the merge is bad, using a standard Vim feature, rather than relying on a timestamp heuristic that is unforgiving to users that save in-progress merge files. The original behavior can be restored by configuring mergetool.vimdiff.trustExitCode to false. Reported-by: Dun Peal <dunpealer@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 7c10605 commit 2967284

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mergetools/vimdiff

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ translate_merge_tool_path() {
4242
;;
4343
esac
4444
}
45+
46+
exit_code_trustable () {
47+
true
48+
}

0 commit comments

Comments
 (0)