Skip to content

Commit 0053676

Browse files
phil-blaingitster
authored andcommitted
git-mergetool--lib.sh: use TOOL_MODE when erroring about unknown tool
In git-mergetool--lib.sh::get_merge_tool_path, we check if the chosen tool is valid via valid_tool and exit with an error message if not. This error message mentions "Unknown merge tool", even if the command the user tried was 'git difftool --tool=unknown'. Use the global 'TOOL_MODE' variable for a more correct error message. Signed-off-by: Philippe Blain <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fe99a52 commit 0053676

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-mergetool--lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ get_merge_tool_path () {
474474
merge_tool="$1"
475475
if ! valid_tool "$merge_tool"
476476
then
477-
echo >&2 "Unknown merge tool $merge_tool"
477+
echo >&2 "Unknown $TOOL_MODE tool $merge_tool"
478478
exit 1
479479
fi
480480
if diff_mode

0 commit comments

Comments
 (0)