From: Jeff King <peff@peff.net>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Jed Brown <jed@59A2.org>, Junio C Hamano <gitster@pobox.com>,
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: git grep: search whole tree by default?
Date: Wed, 23 Oct 2013 22:27:36 -0400 [thread overview]
Message-ID: <20131024022736.GA24992@sigill.intra.peff.net> (raw)
In-Reply-To: <vpqy55jogzr.fsf@anie.imag.fr>
On Wed, Oct 23, 2013 at 10:43:36PM +0200, Matthieu Moy wrote:
> That may be an option. In the case of "git add -u", it was a bit more
> complicated, since a badly used "git add" somehow looses data (not very
> serious, you may only loos the index). So, saying after the fact "oh, by
> the way, I messed up the index" was not a very good transition plan.
>
> In the case of "grep", I'm starting to get convinced that it's OK to do
> so, because the user can basically re-run grep with the right argument
> if needed.
For the same reason, is it insane to want a config option to switch the
default when no command-line option is given? These days I am mostly
working on reasonably-sized projects, and would generally prefer
full-tree grep. But in a past life, I worked on some large projects
where I would never touch anything outside of a particular subtree, and
I generally wanted a more limited grep (i.e., I would park my cwd in
/repo/subsystem1 rather than /repo and work from there, and hits in
/repo/subsystem2 were just useless noise).
That would also provide people who do not like the change of default an
escape hatch to keep the current behavior. And I do not think scripted
use will be inconvenienced; they will already have to use "." or ":/" to
be explicit (if they care) since the behavior is changing.
> The warning could be de-activable with an advice.* option.
Such a config option could also be used to shut up the warning. Though
if the behavior change is deemed non-intrusive enough to not merit a
deprecation period, I am not really sure it is worth having a noisy
warning.
-Peff
next prev parent reply other threads:[~2013-10-24 2:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 8:25 git grep: search whole tree by default? Piotr Krukowiecki
2013-10-23 16:21 ` Matthieu Moy
2013-10-23 17:23 ` Junio C Hamano
2013-10-23 18:20 ` Jed Brown
2013-10-23 18:52 ` Junio C Hamano
2013-10-23 19:24 ` Jed Brown
2013-10-23 19:31 ` Junio C Hamano
2013-10-24 2:15 ` David Aguilar
2013-10-23 20:43 ` Matthieu Moy
2013-10-24 2:27 ` Jeff King [this message]
2013-10-24 19:40 ` Junio C Hamano
2013-10-25 2:23 ` David Aguilar
2013-10-25 4:37 ` Jeff King
2013-10-25 4:52 ` Duy Nguyen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131024022736.GA24992@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jed@59A2.org \
--cc=piotr.krukowiecki@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).