From: "James Bowes" <jbowes@dangerouslyinc.com>
To: "Junio C Hamano" <junkio@cox.net>
Cc: git@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] mergetool: Use merge.tool config option.
Date: Sun, 18 Mar 2007 21:11:07 -0400 [thread overview]
Message-ID: <3f80363f0703181811x54acb3f4n689f4fd68f5a5dbe@mail.gmail.com> (raw)
In-Reply-To: <7vwt1em6gf.fsf@assigned-by-dhcp.cox.net>
On 3/18/07, Junio C Hamano <junkio@cox.net> wrote:
> The problem description looks correct, but I think the original
> meant to reject configuration value for merge_tool that is not
> supported with the version of the script (and screwed up).
There's a bit later on in mergetool that errors out if you have
provided an unknown merge program (either via the command line or
through your config). The command line and the config ways should
probably behave the same, eh? If so, the case block should be brought
up one level like so:
> IOW, wouldn't this be a better way?
>
> if test -z "$merge_tool"
> then
> merge_tool=`git-config merge.tool`
fi
case "$merge_tool" in
kdiff3 | tkdiff | xxdiff | meld | emerge)
;; # happy
*)
echo >&2 "We do not know how to drive $merge_tool"
echo >&2 "Resetting to default..."
unset merge_tool
;;
esac
And then remove the 'Unknown mergetool' bit.
I think either way is fine since they both let you know that you've
entered gobbledeegook or forgot to install something, so I'll defer to
you all for the choice on which way to go.
-James
next prev parent reply other threads:[~2007-03-19 1:11 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 [this message]
2007-03-19 2:32 ` Theodore Tso
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=3f80363f0703181811x54acb3f4n689f4fd68f5a5dbe@mail.gmail.com \
--to=jbowes@dangerouslyinc.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=tytso@mit.edu \
/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).