Skip to content

Commit

Permalink
git-mergetool: don't hardcode 'mergetool' in show_tool_help
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Keeping authored and Junio C Hamano committed Jan 25, 2013
1 parent 26daa84 commit 62b6f7e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions git-mergetool--lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 62b6f7e

Please sign in to comment.