summaryrefslogtreecommitdiff
path: root/git-mergetool.sh
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2007-03-19 02:30:10 (GMT)
committerTheodore Ts'o <tytso@mit.edu>2007-03-19 02:30:10 (GMT)
commitd6678c28e30e836449092a2917d4b0bd6254b06c (patch)
treef12f255eac19900b6c2ca2fe54dcc604cd00bb27 /git-mergetool.sh
parent9cec65399d3575774910b21c1cfd762a5e88a245 (diff)
downloadgit-d6678c28e30e836449092a2917d4b0bd6254b06c.zip
git-d6678c28e30e836449092a2917d4b0bd6254b06c.tar.gz
git-d6678c28e30e836449092a2917d4b0bd6254b06c.tar.bz2
mergetool: print an appropriate warning if merge.tool is unknown
Also add support for vimdiff Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'git-mergetool.sh')
-rwxr-xr-xgit-mergetool.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/git-mergetool.sh b/git-mergetool.sh
index 563c5c0..7942fd0 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