git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add two grep config options

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 25, 2011, 23:25 UTC
Message-ID
<7vlj024wal.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1301088071-918-1-git-send-email-jratt0@gmail.com>
Joe Ratterman <jratt0@gmail.com> writes:
Show 8 quoted lines
> 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?
Previous: Joe RattermanNext: Michael J Gruber
Message 2 of 19 in “Add two grep config options”
  1. Add two grep config optionsJoe Ratterman, Mar 25, 2011
  2. Junio C HamanoMar 25, 2011
  3. Michael J GruberMar 28, 2011
  4. Jeff KingMar 28, 2011
  5. Michael J GruberMar 28, 2011
  6. Jeff KingMar 28, 2011
  7. Junio C HamanoMar 28, 2011
  8. Jeff KingMar 28, 2011
  9. Junio C HamanoMar 28, 2011
  10. Joe RattermanMar 28, 2011
  11. Bert WesargMar 28, 2011
  12. Joe RattermanMar 28, 2011
  13. Junio C HamanoMar 28, 2011
  14. grep: allow -E and -n to be turned on by default via configurationJunio C Hamano, Mar 28, 2011
  15. Junio C HamanoMar 28, 2011
  16. Joe RattermanMar 28, 2011
  17. Junio C HamanoMar 28, 2011
  18. Joe RattermanMar 29, 2011
  19. grep: allow -E and -n to be turned on by default via configurationJoe Ratterman, Mar 30, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.