Re: [PATCH] Add two grep config options

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

 



On Mon, Mar 28, 2011 at 02:00:58PM +0200, Michael J Gruber wrote:

> >> We could safeguard scripts from this by
> >>
> >> - checking istty and
> >> - checking env for GIT_PLUMBING
> > 
> > I'm not sure isatty is a good check. In the example above, grep's output
> > was not going to a tty, but I did want to respect the user's choice of
> > "-E".
> 
> I'm not saying it's good either, but it is something that a new git
> (i.e. between the time we introduce ui.* and GIT_PLUMBING/--no-plum and
> the time we rely on the latter) could do to make use of (and promote)
> the new ui.* options.

The example I gave was a false negative (we could have used the user's
preference but the isatty check said no). Which is OK for a transitional
period, because we err on the side of being conservative.  But I wonder
if there are false positives (i.e., cases where the isatty check says
it's OK, but we are breaking a script).  Maybe something where the
script prepares a BRE to hand to git-grep, but we want to show the user
the output in their usual way.

That seems pretty contrived, though. Maybe it is a non-issue.

-Peff
--
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]