git-mergetool: don't hardcode 'mergetool' in show_tool_help
authorJohn Keeping <john@keeping.me.uk>
Fri, 25 Jan 2013 09:43:50 +0000 (01:43 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 25 Jan 2013 19:07:54 +0000 (11:07 -0800)
When using show_tool_help from git-difftool we will want it to print
"git difftool" not "git mergetool" so use "git ${TOOL_MODE}tool".

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-mergetool--lib.sh

index 1748315bc2b45db2b078a3ff293f779d18f7026d..4c1e1292a68b28cc88483fc5edc0df775cf6eec4 100644 (file)
@@ -188,12 +188,14 @@ show_tool_help () {
                        unavailable="$unavailable$i$LF"
                fi
        done
+
+       cmd_name=${TOOL_MODE}tool
        if test -n "$available"
        then
-               echo "'git mergetool --tool=<tool>' may be set to one of the following:"
+               echo "'git $cmd_name --tool=<tool>' may be set to one of the following:"
                echo "$available" | sort | sed -e 's/^/ /'
        else
-               echo "No suitable tool for 'git mergetool --tool=<tool>' found."
+               echo "No suitable tool for 'git $cmd_name --tool=<tool>' found."
        fi
        if test -n "$unavailable"
        then