git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>, "Git List" <git@vger.kernel.org>
Subject: Re: [PATCH] stash: Add stash.showFlag config variable
Date: Fri, 28 Aug 2015 10:47:42 +0900	[thread overview]
Message-ID: <20150828014742.GA17656@sejong> (raw)
In-Reply-To: <CAPig+cQmTS5rRkfh1in9qR4MyP1_y9vNar7U4H3uayK6Vixa7w@mail.gmail.com>

Hi,

On Thu, Aug 27, 2015 at 08:16:35PM -0400, Eric Sunshine wrote:
> On Thu, Aug 27, 2015 at 11:36 AM, Namhyung Kim <namhyung@gmail.com> wrote:
> > On Fri, Aug 28, 2015 at 12:20 AM, SZEDER Gábor <szeder@ira.uka.de> wrote:
> >>  - This hunk runs the the exact same 'git config' command twice.  Run it
> >>    only once, perhaps something like this:
> >>
> >>      show_flag=$(git config --get stash.showflag || echo --stat)
> >>
> >>    (I hope there are no obscure crazy 'echo' implemtations out there
> >>    that might barf on the unknown option '--stat'...)
> >
> > What about `echo "--stat"` then?
> 
> Adding quotes around --stat won't buy you anything since the shell
> will have removed the quotes by the time the argument is passed to
> echo, so an "obscure crazy" 'echo' will still see --stat as an option.
> 
> POSIX states that printf should take no options, so:
> 
>     printf --stat
> 
> should be safe, but some implementations do process options (and will
> complain about the unknown --stat option), therefore, best would be:
> 
>     printf '%s' --stat

That's good to know.  I'll change it that way.

Thanks for your review!
Namhyung

  reply	other threads:[~2015-08-28  2:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 13:52 [PATCH] stash: Add stash.showFlag config variable Namhyung Kim
2015-08-27 15:20 ` SZEDER Gábor
2015-08-27 15:36   ` Namhyung Kim
2015-08-28  0:16     ` Eric Sunshine
2015-08-28  1:47       ` Namhyung Kim [this message]
2015-08-28  1:08 ` Junio C Hamano
2015-08-28  1:54   ` Namhyung Kim
2015-08-28 18:10     ` Junio C Hamano
2015-08-29 15:19       ` Namhyung Kim

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=20150828014742.GA17656@sejong \
    --to=namhyung@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    --cc=szeder@ira.uka.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).