All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Noel Grandin <noel@peralex.com>,
	Trevor Saunders <tbsaunde@tbsaunde.org>,
	Duy Nguyen <pclouds@gmail.com>, git <git@vger.kernel.org>
Subject: Re: feature request: excluding files/paths from "git grep"
Date: Wed, 04 Mar 2015 22:03:54 -0800	[thread overview]
Message-ID: <xmqqy4nc3rqt.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150305052206.GC3344@peff.net> (Jeff King's message of "Thu, 5 Mar 2015 00:22:06 -0500")

Jeff King <peff@peff.net> writes:

> On Wed, Mar 04, 2015 at 12:56:10PM -0800, Junio C Hamano wrote:
>
>> > As in, while working on a specific project, I sometimes just want to
>> > exclude, for the time being, a bunch of stuff from 'git grep'.
>> 
>> The key word here is "for the time being", though.  What would you
>> do once you are done with the "for the time being" activity?  "git
>> config --unset"?
>
> IMHO this is being too paternalistic. You can already shoot yourself
> in the foot by configuring an alias to grep, running your alias, and
> wondering why it does not produce the results you wanted.

Yeah, as I said, it is a deliberately paternalistic stance.  But at
least when I say "git mygrep" using the alias mechanism and get a
result that is different from what I expect from "git grep", I would
know I am doing something different with "mygrep" from "grep", no?

And a great thing about that "use alias" approach is that we can
sidestep the entire "then what should I do when I have to override
the configured thing for one-shot invocation?" question, as there is
an obvious simple answer "don't use that alias but use the
underlying command".

      reply	other threads:[~2015-03-05  6:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 12:23 feature request: excluding files/paths from "git grep" Noel Grandin
2015-02-25 13:46 ` Duy Nguyen
2015-02-25 14:31   ` Jeff King
2015-02-25 18:33     ` Junio C Hamano
2015-02-25 18:51       ` Jeff King
2015-02-25 19:01         ` Junio C Hamano
2015-02-25 19:11           ` Jeff King
2015-02-26 11:16             ` Michael J Gruber
2015-02-26 11:58               ` Duy Nguyen
2015-02-26 20:59               ` Junio C Hamano
2015-02-27 15:13                 ` Michael J Gruber
2015-02-27 19:17                   ` Junio C Hamano
2015-02-27 10:04             ` Trevor Saunders
2015-03-01  3:06               ` Junio C Hamano
2015-03-01 13:03                 ` Trevor Saunders
2015-03-01 23:22                   ` Junio C Hamano
2015-03-02 12:50                     ` Trevor Saunders
2015-03-04 11:25                       ` Noel Grandin
2015-03-04 20:56                         ` Junio C Hamano
2015-03-05  5:22                           ` Jeff King
2015-03-05  6:03                             ` Junio C Hamano [this message]

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=xmqqy4nc3rqt.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=noel@peralex.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=tbsaunde@tbsaunde.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.