From: Theodore Ts'o Date: Mon, 19 Mar 2007 02:30:10 +0000 (-0400) Subject: mergetool: print an appropriate warning if merge.tool is unknown X-Git-Tag: v1.5.1-rc1~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d6678c28e30e836449092a2917d4b0bd6254b06c;p=git.git mergetool: print an appropriate warning if merge.tool is unknown Also add support for vimdiff Signed-off-by: "Theodore Ts'o" --- diff --git a/git-mergetool.sh b/git-mergetool.sh index 563c5c048..7942fd0b6 100755 --- a/git-mergetool.sh +++ b/git-mergetool.sh @@ -288,10 +288,15 @@ done if test -z "$merge_tool"; then merge_tool=`git-config merge.tool` - if test $merge_tool = kdiff3 -o $merge_tool = tkdiff -o \ - $merge_tool = xxdiff -o $merge_tool = meld ; then - unset merge_tool - fi + case "$merge_tool" in + kdiff3 | tkdiff | xxdiff | meld | emerge | vimdiff) + ;; # happy + *) + echo >&2 "git config option merge.tool set to unknown tool: $merge_tool" + echo >&2 "Resetting to default..." + unset merge_tool + ;; + esac fi if test -z "$merge_tool" ; then