git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Joe Ratterman <jratt0@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] Add two grep config options
Date: Mon, 28 Mar 2011 08:09:38 -0400	[thread overview]
Message-ID: <20110328120938.GA14198@sigill.intra.peff.net> (raw)
In-Reply-To: <4D90787A.8010403@drmicha.warpmail.net>

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

  reply	other threads:[~2011-03-28 12:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 21:21 [PATCH] Add two grep config options Joe Ratterman
2011-03-25 23:25 ` Junio C Hamano
2011-03-28  7:24   ` Michael J Gruber
2011-03-28 11:54     ` Jeff King
2011-03-28 12:00       ` Michael J Gruber
2011-03-28 12:09         ` Jeff King [this message]
2011-03-28 17:12       ` Junio C Hamano
2011-03-28 17:21         ` Jeff King
2011-03-28 18:39           ` Junio C Hamano
2011-03-28 18:08         ` Joe Ratterman
2011-03-28 12:13     ` Bert Wesarg
2011-03-28 14:48       ` Joe Ratterman
2011-03-28 17:14         ` Junio C Hamano
2011-03-28 22:12   ` [PATCH] grep: allow -E and -n to be turned on by default via configuration Junio C Hamano
2011-03-28 22:14     ` Junio C Hamano
2011-03-28 22:41     ` Joe Ratterman
2011-03-28 23:16       ` Junio C Hamano
2011-03-29  3:12     ` Joe Ratterman
2011-03-30 19:31       ` [PATCH v3] " Joe Ratterman

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=20110328120938.GA14198@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jratt0@gmail.com \
    /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).