From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
Jed Brown <jed@59A2.org>,
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: git grep: search whole tree by default?
Date: Thu, 24 Oct 2013 12:40:44 -0700 [thread overview]
Message-ID: <xmqqd2muo3sz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20131024022736.GA24992@sigill.intra.peff.net> (Jeff King's message of "Wed, 23 Oct 2013 22:27:36 -0400")
Jeff King <peff@peff.net> writes:
> 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.
There is a big difference between "scripted use will have an escape
hatch" and "scripted use will not be inconvenienced". We *know*
scripts will be inconvenienced with or without such a configuration
variable, as they *have* to be updated if they rely on the current
behaviour of "git grep" that limits its search to the current
directory when fed no pathspec (and if their users want to keep the
current behaviour of such scripts). Anything short of a warning (or
even erroring out) that is designed to annoy the users during the
transition period will help ease the pain of transition of scripts.
An annoying warning still can only *ease*, but cannot eliminate, the
pain of transition. The scripts need to be updated to adjust to the
new behaviour; there is no getting around to it.
Even if we ignore the "helping your colleague at her terminal", cf.
http://thread.gmane.org/gmane.comp.version-control.git/133570/focus=133683
issue for now, adding a new configuration variable from day one
makes the transition of scripts somewhat worse, I am afraid. Doing
so robs us a way to add such an annoying warning to help people
foresee problems in their existing scripts before the default
changes (the configuration presumably will disable the "this command
line will behave differently after the default changes" warning).
As I said, I think we can train people without an annoying warning,
as hits outside their current directory will serve as an annoyance
already, and people who set such a configuration in their repository
(or $HOME/.gitconfig), get used to the chosen behaviour too much,
and get surprised when they get to use a vanilla intallation of Git
(either helping colleague or setting up a new work environment) have
only themselves to blame, so it may not be too big a deal.
But I do not think the same reasoning extends to scripted uses X-<.
next prev parent reply other threads:[~2013-10-24 19:40 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
2013-10-24 19:40 ` Junio C Hamano [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqd2muo3sz.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=git@vger.kernel.org \
--cc=jed@59A2.org \
--cc=peff@peff.net \
--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.
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.