From: Junio C Hamano <gitster@pobox.com>
To: Joe Ratterman <jratt0@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Add two grep config options
Date: Fri, 25 Mar 2011 16:25:54 -0700 [thread overview]
Message-ID: <7vlj024wal.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 1301088071-918-1-git-send-email-jratt0@gmail.com
Joe Ratterman <jratt0@gmail.com> writes:
> grep.extended-regexp: Enabling this boolean option has the same effect
> as adding "-E" to all "git grep " instantiations. This can be
> disabled by specifying "--no-extended-regexp" on a particular call.
>
> grep.line-numbers: Enabling this boolean option has the same effect as
> adding "-n" to all "git grep " instantiations.
>
> Signed-off-by: Joe Ratterman <jratt0@gmail.com>
Thanks.
Things to consider:
- Apply this patch on top of "master",run "git shortlog v1.7.4..HEAD",
store the output somewhere, and imagine reading that 2 months from now.
Does a single line in the output about this patch sufficiently tell you
what it was about?
- Configuration variables are spelled without hyphens between words (you
can see "gui.commitmsgwidth" in the context of the patch you sent and
notice that it is not "gui.commit-msg-width").
- This will break scripts people have written, knowing that they can rely
on "grep" they wrote without giving "-E" from their command line will
use BRE, and force them to update the script with --no-extended-regexp
for no good reason. Worse yet, there isn't even --no-line-numbers
supported to defeat grep.linenumbers configuration to protect such
scripts.
I understand that some people would feel that the convenience would
outweigh the risk of script breakage in this particular case, and I am
sympathetic to the cause, but I still have to point it out. Is there
anything we can do to mitigate the risk somehow?
next prev parent reply other threads:[~2011-03-25 23:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-25 21:21 [PATCH] Add two grep config options Joe Ratterman
2011-03-25 23:25 ` Junio C Hamano [this message]
2011-03-28 7:24 ` Michael J Gruber
2011-03-28 11:54 ` Jeff King
2011-03-28 12:00 ` Michael J Gruber
2011-03-28 12:09 ` Jeff King
2011-03-28 17:12 ` Junio C Hamano
2011-03-28 17:21 ` Jeff King
2011-03-28 18:39 ` Junio C Hamano
2011-03-28 18:08 ` Joe Ratterman
2011-03-28 12:13 ` Bert Wesarg
2011-03-28 14:48 ` Joe Ratterman
2011-03-28 17:14 ` Junio C Hamano
2011-03-28 22:12 ` [PATCH] grep: allow -E and -n to be turned on by default via configuration Junio C Hamano
2011-03-28 22:14 ` Junio C Hamano
2011-03-28 22:41 ` Joe Ratterman
2011-03-28 23:16 ` Junio C Hamano
2011-03-29 3:12 ` Joe Ratterman
2011-03-30 19:31 ` [PATCH v3] " Joe Ratterman
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=7vlj024wal.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jratt0@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 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 NNTP newsgroup(s).