Files
git/Documentation
Denton Liu 05fb8726cc mergetool: use get_merge_tool function
In git-mergetool, the logic for getting which merge tool to use is
duplicated in git-mergetool--lib, except for the fact that it needs to
know whether the tool was guessed or not.

Rewrite `get_merge_tool` to return whether or not the tool was guessed
through the return code and make git-mergetool call this function
instead of duplicating the logic. Note that 1 was chosen to be the
return code of when a tool is guessed because it seems like a slightly
more abnormal condition than getting a tool that's explicitly specified
but this is completely arbitrary.

Also, let `$GIT_MERGETOOL_GUI` be set to determine whether or not the
guitool will be selected.

This change is not completely backwards compatible as there may be
external users of git-mergetool--lib. However, only one user,
git-diffall[1], was found from searching GitHub and Google, and this
tool is superseded by `git difftool --dir-diff` anyway. It seems very
unlikely that there exists an external caller that would take into
account the return code of `get_merge_tool` as it would always return 0
before this change so this change probably does not affect any external
users.

[1]: https://github.com/thenigan/git-diffall

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-05-13 23:11:59 +09:00
..
2018-10-19 13:52:51 +09:00
2018-06-25 13:22:36 -07:00
2018-05-23 14:38:22 +09:00
2018-06-27 10:29:10 -07:00
2018-10-03 21:25:57 -07:00
2018-08-01 13:37:18 -07:00
2018-10-07 10:11:02 +09:00
2016-08-11 14:35:42 -07:00
2018-09-17 13:53:55 -07:00
2017-06-27 10:35:49 -07:00
2018-04-18 12:49:26 +09:00