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 <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Philippe Blain committed
Nov 22, 2024 at 19:50 UTC
00536761df113c8ad935c78bf407e427fce2f040
1 file changed
+1
-1
git-mergetool--lib.sh
+1
-1
@@ -474,7 +474,7 @@ get_merge_tool_path () {
474
merge_tool="$1"
475
if ! valid_tool "$merge_tool"
476
then
477
- echo >&2 "Unknown merge tool $merge_tool"
477
+ echo >&2 "Unknown $TOOL_MODE tool $merge_tool"
478
exit 1
479
fi
480
if diff_mode