git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Steffen Prohaska <prohaska@zib.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path
Date: Thu, 18 Oct 2007 01:27:24 -0400	[thread overview]
Message-ID: <20071018052724.GA27813@spearce.org> (raw)
In-Reply-To: <11926413723666-git-send-email-prohaska@zib.de>

Steffen Prohaska <prohaska@zib.de> wrote:
> This commit adds a mechanism to provide absolute paths to the
> external programs called by 'git mergetool'.  ...
...
> @@ -297,17 +297,38 @@ do
>      shift
>  done
>  
> +valid_tool() {
> +	case "$1" in
> +		kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff)
> +			;; # happy
> +		*)
> +			return 1
> +			;;
> +	esac
> +}
...
> +    test -n "$merge_tool" || valid_tool "$merge_tool" || {

Wouldn't an empty $merge_tool string be caught above in the
valid_tool function where it falls through and returns 1?
So isn't test -n here redundant?

-- 
Shawn.

  parent reply	other threads:[~2007-10-18  5:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17 17:16 [PATCH 0/2 v3] mergetool Steffen Prohaska
2007-10-17 17:16 ` [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path Steffen Prohaska
2007-10-17 17:16   ` [PATCH 2/2 v3] mergetool: add support for ECMerge Steffen Prohaska
2007-10-18  5:27   ` Shawn O. Pearce [this message]
2007-10-18  7:52     ` [PATCH 1/2 v3] mergetool: use path to mergetool in config var mergetool.<tool>.path Steffen Prohaska
2007-10-18  7:53       ` [PATCH 1/2 v4] " Steffen Prohaska
2007-10-18  8:00       ` [PATCH 1/2 v3] " Shawn O. Pearce
2007-10-18  8:40         ` Steffen Prohaska
2007-10-18 10:25           ` [PATCH] mergetool: avoid misleading message "Resetting to default..." Steffen Prohaska
2007-10-17 17:20 ` [PATCH 0/2 v3] mergetool Steffen Prohaska

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=20071018052724.GA27813@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=prohaska@zib.de \
    /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).