git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
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: Fri, 25 Oct 2013 00:37:17 -0400	[thread overview]
Message-ID: <20131025043717.GC11810@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqd2muo3sz.fsf@gitster.dls.corp.google.com>

On Thu, Oct 24, 2013 at 12:40:44PM -0700, Junio C Hamano wrote:

> 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".

I think my communication may have been muddled in transit. What I meant
regarding inconvenienced was "not any more so than by simply changing
the behavior in the first place, since scripts already will need to
start becoming explicit due to the behavior change".

And for the "escape hatch", I did not mean for scripts. I actually meant
for users who do not like the extra typing and complain "stupid git, I
always want '.'; you used to do what I want and now you do not".

> Even if we ignore the "helping your colleague at her terminal", cf.
> 
>     http://thread.gmane.org/gmane.comp.version-control.git/133570/focus=133683

FWIW, I have never agreed with that line of reasoning. I was going to
explain why, but I see that I already did in response to the article you
linked. :)

> 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).

If you want to have an annoying warning, why not consider the config a
tristate? Do X or do Y, or if unset, do X with an annoying warning
(which will switch to Y in the future). That does not help a user who
sets the variable after seeing the warning the first time, then later
runs a script that silently chooses the wrong behavior.

But neither does a warning that is squelched by advice.*, which the user
will also set soon after seeing it.

The only way to hit those scripts is to yell at the user anytime the
appropriate command-line override is not selected, with no way to turn
it off. That's what we're doing now with "git add". I think people find
it a little annoying. But perhaps it is the least of all evils.


Anyway, I have said my piece, and I think we are on the same page with
the tradeoffs (what they are, though we may value them differently).  I
do not care that strongly about the config option these days; as I said,
it was something I would have used in certain workflows, but I do not
foresee myself even setting it these days. So I am willing to forego it
if there are concerns it will make things worse.

-Peff

  parent reply	other threads:[~2013-10-25  4:37 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
2013-10-25  2:23                 ` David Aguilar
2013-10-25  4:37                 ` Jeff King [this message]
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=20131025043717.GC11810@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).