Re: [PATCH] grep: --full-tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> 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.

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

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.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]