Re: [PATCH] stash: Add stash.showFlag config variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
> > On Fri, Aug 28, 2015 at 12:20 AM, SZEDER Gábor <szeder@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]