summaryrefslogtreecommitdiff
path: root/git-mergetool--lib.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-07-23 21:16:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-23 21:42:39 (GMT)
commit109859e27445a3ad12eb8f8cba43a5aa8f701733 (patch)
tree669e753fa602ccdfcc2a517b53a7a70800cdf599 /git-mergetool--lib.sh
parente6dfbcf12b0e70897818cb36903de0625931a5c6 (diff)
downloadgit-109859e27445a3ad12eb8f8cba43a5aa8f701733.zip
git-109859e27445a3ad12eb8f8cba43a5aa8f701733.tar.gz
git-109859e27445a3ad12eb8f8cba43a5aa8f701733.tar.bz2
mergetool: support --tool-help option like difftool does
This way we do not have to risk the list of tools going out of sync between the implementation and the documentation. In the same spirit as bf73fc2 (difftool: print list of valid tools with '--tool-help', 2012-03-29), trim the list of merge backends in the documentation. We do not want to have a complete list of valid tools; we only want a list to help people guess what kind of things the tools do to be specified there, and refer them to --tool-help for a complete list. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-mergetool--lib.sh')
-rw-r--r--git-mergetool--lib.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh
index ed630b2..f730253 100644
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -111,7 +111,7 @@ run_merge_tool () {
return $status
}
-guess_merge_tool () {
+list_merge_tool_candidates () {
if merge_mode
then
tools="tortoisemerge"
@@ -136,6 +136,10 @@ guess_merge_tool () {
tools="$tools emerge vimdiff"
;;
esac
+}
+
+guess_merge_tool () {
+ list_merge_tool_candidates
echo >&2 "merge tool candidates: $tools"
# Loop over each candidate and stop when a valid merge tool is found.