All of lore.kernel.org
 help / color / mirror / Atom feed
From: A Large Angry SCM <gitzilla@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH] grep: --full-tree
Date: Wed, 25 Nov 2009 17:41:33 -0500	[thread overview]
Message-ID: <4B0DB29D.5010101@gmail.com> (raw)
In-Reply-To: <20091125222625.GB2861@coredump.intra.peff.net>

Jeff King wrote:
> On Wed, Nov 25, 2009 at 02:19:35PM -0800, Junio C Hamano wrote:
> 
>> Jeff King <peff@peff.net> writes:
>>
>>> ... That is, I don't want to have to remember "git grep
>>> --full-tree" or "git grep /" every time
>> But that cuts both ways.  If you change the default to full-tree,
>> people will forget to put "." every time when asking to limit to the
>> current directory.
> 
> I know. Which is why I am arguing for a configuration option.
> 
> Though as a side note, I think if you are going to err, it is probably
> better to err in showing _too much_ data. It is easier for the user to
> notice the situation and re-issue the command with more limits than it
> is for them to notice that some results are missing and re-issue the
> command with fewer limits.
> 
>>> If I am the one who sets the configuration variable to something more
>>> sensible for my workflow, who am I hurting?
>> Somebody more clueful in git than you who is called to help you in your
>> repository when you have trouble.  Obviously "you" in this sentence is not
>> Jeff King, but I think you get the point.
> 
> Clearly, because there _isn't_ anybody more clueful than me in git. ;)
> 
> But that is what my meta-rant elsewhere in the thread was about. Sure,
> it hurts when more clueful people are called in (and that includes
> asking for help on the list). But that evil to me is much less than a
> user who is frustrated because they have to specify the same thing to
> git over and over again.
> 
>> And re-read what I wrote in its entirety and notice I am not disagreeing
>> with you that the long term goal should be to have the default changed
>> consistently for all command to do the full tree.  The important first
>> step is to make sure we are capable of doing both full tree and limit to
>> current directory and "grep" is one example that cannot do both, and be it
>> the --full-tree option or new /rooted-pathspec, we need some change _now_
>> that is backward compatible to pave the way for later changes.  We give
>> people convenient way to choose between the two, and _train_ them to
>> express which way they want _without_ having to think.  After that is
>> achieved, the default does not matter much and we can safely change the
>> default.
>>
>> Think of it as a way to force existing users _unlearn_ the command
>> specific default we currently have.  Because any change of default will
>> hurt them until that is done, we should start training them as early as
>> possible.
> 
> I agree with all of this as far as changing the default goes. But the
> point of my earlier messages was that I don't think there _is_ one sane
> default. I really do want it different per-project. And that means a
> configuration option.

Since grep is so useful, both interactively and scripted, outside of 
git, this is a pretty convincing argument that git-grep, and all other 
git commands with configurable behavior or defaults that change over 
time, need a both a scripting form and an interactive form.

  reply	other threads:[~2009-11-25 22:41 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-24  8:56 [PATCH] grep: --full-tree Junio C Hamano
2009-11-25 13:16 ` Michael J Gruber
2009-11-25 19:32   ` Junio C Hamano
2009-11-25 14:56 ` Sverre Rabbelier
2009-11-25 19:32   ` Junio C Hamano
2009-11-25 20:19     ` Sverre Rabbelier
2009-11-25 20:23       ` Junio C Hamano
2009-11-25 20:46         ` Sverre Rabbelier
2009-11-25 23:31           ` Johannes Schindelin
2009-11-25 23:29             ` Sverre Rabbelier
2009-11-25 20:52     ` Jeff King
2009-11-25 20:39 ` Jeff King
2009-11-25 20:52   ` Junio C Hamano
2009-11-25 21:00     ` Jeff King
2009-11-25 21:33       ` Junio C Hamano
2009-11-25 21:49         ` Jeff King
2009-11-25 22:12           ` James Pickens
2009-11-25 22:20             ` Jeff King
2009-11-26 17:56               ` James Pickens
2009-11-27  6:20                 ` Jeff King
2009-11-27  8:18                   ` Junio C Hamano
2009-11-27  9:31                   ` Johannes Schindelin
2009-11-27  9:59                     ` Jeff King
2009-11-27 10:53                       ` Johannes Schindelin
2009-11-27 16:27                         ` Uri Okrent
2009-11-27 18:29                           ` Junio C Hamano
2009-11-27 18:47                             ` Uri Okrent
2009-11-27 20:53                               ` Jeff King
2009-11-29 19:50                                 ` Uri Okrent
2009-11-29 11:48                             ` Felipe Contreras
2009-11-27 18:02                         ` Jeff King
2009-11-27 20:07                           ` Johannes Schindelin
2009-11-27 21:05                             ` Jeff King
2009-11-29 10:28                               ` Johannes Schindelin
2009-11-29 18:32                                 ` Jeff King
2009-11-29 19:49                                   ` Junio C Hamano
2009-11-29 12:13                             ` Felipe Contreras
2009-11-27 18:29                       ` Junio C Hamano
2009-11-27 20:50                         ` Jeff King
2009-11-29 10:21                           ` Johannes Schindelin
2009-11-29 18:24                             ` Jeff King
2009-11-27 10:37                     ` Matthieu Moy
2009-11-27 10:56                       ` Johannes Schindelin
2009-11-25 22:26             ` Wincent Colaiuta
2009-11-26  0:00               ` Junio C Hamano
2009-11-26  0:16                 ` A Large Angry SCM
2009-11-26  0:20                   ` Junio C Hamano
2009-11-26  0:30                     ` A Large Angry SCM
2009-11-26  0:36                       ` Junio C Hamano
2009-11-26 18:14                 ` James Pickens
2009-11-25 22:19           ` Junio C Hamano
2009-11-25 22:26             ` Jeff King
2009-11-25 22:41               ` A Large Angry SCM [this message]
2009-11-25 22:53                 ` Jeff King
2009-11-25 23:07                   ` A Large Angry SCM
2009-11-25 23:22                     ` Jeff King
2009-11-29 11:38                       ` Felipe Contreras
2009-11-29 19:45                         ` Uri Okrent
2009-11-26  0:02               ` Junio C Hamano
2009-11-27  6:22                 ` Jeff King
2009-11-25 22:15         ` A Large Angry SCM
2009-11-25 22:21           ` Junio C Hamano
2009-11-25 22:31             ` A Large Angry SCM
2009-11-25 22:43               ` A Large Angry SCM
2009-11-25 23:34         ` Johannes Schindelin
2009-11-25 23:41           ` Junio C Hamano
2009-11-26  0:04             ` Johannes Schindelin
2009-11-26  0:13               ` Junio C Hamano

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=4B0DB29D.5010101@gmail.com \
    --to=gitzilla@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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.