git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charles Bailey <charles@hashpling.org>
To: John Keeping <john@keeping.me.uk>
Cc: git@vger.kernel.org, David Aguilar <davvid@gmail.com>
Subject: Re: [PATCH 2/2] difftool: don't assume that default sh is sane
Date: Sat, 19 Jul 2014 19:29:50 +0100	[thread overview]
Message-ID: <20140719182950.GA31037@hashpling.org> (raw)
In-Reply-To: <20140719172132.GB26927@serenity.lan>

On Sat, Jul 19, 2014 at 06:21:32PM +0100, John Keeping wrote:
> 
> What's the reason for forcing `--tool-help` to be the last option?
> Wouldn't it be simpler to just change the top-level case statement to:
> 
> 	--tool-help=*)
> 		TOOL_MODE=${1#--tool-help=}
> 		show_tool_help
> 		;;
> 	--tool-help)
> 		show_tool_help
> 		;;

It doesn't make sense to use --tool-help with other parameters so issuing
an error made sense to me at the time. You've pointed out to me that I
don't error when those other options come first so I'm now unsure how
valuable this behaviour is, now. (I can't immediately see a really neat way
to give a diagnostic if other options do come first.)

Your version is good, obviously simpler.

  reply	other threads:[~2014-07-19 18:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 16:35 [PATCH 1/2] mergetool: don't require a work tree for --tool-help Charles Bailey
2014-07-19 16:35 ` [PATCH 2/2] difftool: don't assume that default sh is sane Charles Bailey
2014-07-19 17:21   ` John Keeping
2014-07-19 18:29     ` Charles Bailey [this message]
2014-07-29  7:53   ` David Aguilar
2014-07-29  8:03     ` David Aguilar

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=20140719182950.GA31037@hashpling.org \
    --to=charles@hashpling.org \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=john@keeping.me.uk \
    /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).