git-mergetool: don't hardcode 'mergetool' in show_tool_help

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>

John Keeping committed Jan 25, 2013 at 01:43 UTC 62b6f7e021cd5e7a7c3ee8d46ec45fe39d1bf562
1 file changed +4 -2
git-mergetool--lib.sh
+4 -2
@@ -188,12 +188,14 @@ show_tool_help () {
188 unavailable="$unavailable$i$LF"
189 fi
190 done
191 +
192 + cmd_name=${TOOL_MODE}tool
193 if test -n "$available"
194 then
193 - echo "'git mergetool --tool=<tool>' may be set to one of the following:"
195 + echo "'git $cmd_name --tool=<tool>' may be set to one of the following:"
196 echo "$available" | sort | sed -e 's/^/ /'
197 else
196 - echo "No suitable tool for 'git mergetool --tool=<tool>' found."
198 + echo "No suitable tool for 'git $cmd_name --tool=<tool>' found."
199 fi
200 if test -n "$unavailable"
201 then