git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@mit.edu>
To: James Bowes <jbowes@dangerouslyinc.com>
Cc: Junio C Hamano <junkio@cox.net>, git@vger.kernel.org
Subject: Re: [PATCH] mergetool: Use merge.tool config option.
Date: Sun, 18 Mar 2007 22:32:38 -0400	[thread overview]
Message-ID: <20070319023238.GC11371@thunk.org> (raw)
In-Reply-To: <3f80363f0703181811x54acb3f4n689f4fd68f5a5dbe@mail.gmail.com>

It seemed to me that Junio's suggestion made the most amount of sense,
but I tinkered with the with the warning message to make it clear that
the cause of the warning was a bugus tool in the merge.tool
configuration parameter.

This has also been pushed out to git://repo.or.cz/git/mergetool.git

Junio, please pull if you approve...

					- Ted

commit d6678c28e30e836449092a2917d4b0bd6254b06c
Author: Theodore Ts'o <tytso@mit.edu>
Date:   Sun Mar 18 22:30:10 2007 -0400

    mergetool: print an appropriate warning if merge.tool is unknown
    
    Also add support for vimdiff
    
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

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

  reply	other threads:[~2007-03-19  2:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-18 16:13 [PATCH] mergetool: Use merge.tool config option James Bowes
2007-03-19  0:18 ` Junio C Hamano
2007-03-19  1:11   ` James Bowes
2007-03-19  2:32     ` Theodore Tso [this message]
2007-03-19  4:09       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070319023238.GC11371@thunk.org \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=jbowes@dangerouslyinc.com \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).