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

Re: [PATCH 6/6] log --grep: honor grep.patterntype etc. configuration variables

From
Jeff King <peff@peff.net>
Date
Oct 4, 2012, 08:17 UTC
Message-ID
<20121004081732.GD31305@sigill.intra.peff.net>
In-Reply-To
<1349314419-8397-7-git-send-email-gitster@pobox.com>
On Wed, Oct 03, 2012 at 06:33:39PM -0700, Junio C Hamano wrote:
Show 11 quoted lines
> Read grep.extendedregexp, grep.patterntype, etc. from the
> configuration so that "log --grep='<pcre>'" honors the user
> preference without an explicit -P from the command line.
> 
> Now that the callback parameter, which was so far unused, to
> git_log_config() has to be of type "struct rev_info *", stop passing
> it down to git_diff_ui_config().  The latter does not currently take
> any callback parameter, and when it does, we would need to make a
> structure that has rev info and that parameter and pass it to
> git_log_config() anyway, and until that happens, passing NULL will
> be less error prone.

Hmm. So I think this is a nice feature for some people, but I wonder if we would run into any plumbing compatibility issues. People do tend to use "log" as plumbing (since rev-list is not as capable). On the other hand, I'd think most internal uses of "log --grep" would be passing something along from the user, and the user would be happy to have it interpreted by their chosen set of rules.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 20 of 23 in “[ANNOUNCE] Git v1.8.0-rc0”
  1. Junio C HamanoOct 1, 2012
  2. grep.patternType (was: Re: [ANNOUNCE] Git v1.8.0-rc0)Junio C Hamano, Oct 3, 2012
  3. Junio C HamanoOct 3, 2012
  4. Michal KiedrowiczOct 4, 2012
  5. J SmithOct 5, 2012
  6. 0/6 Tying loose ends of extended "grep"Junio C Hamano, Oct 4, 2012
  7. 1/6 grep: move configuration support to top-level grep.[ch]Junio C Hamano, Oct 4, 2012
  8. 2/6 grep: move pattern-type bits support to top-level grep.[ch]Junio C Hamano, Oct 4, 2012
  9. 3/6 log --grep: use the same helper to set -E/-F options as "git grep"Junio C Hamano, Oct 4, 2012
  10. Jeff KingOct 4, 2012
  11. 4/6 log --grep: accept --basic-regexp and --perl-regexpJunio C Hamano, Oct 4, 2012
  12. Jeff KingOct 4, 2012
  13. Junio C HamanoOct 4, 2012
  14. 5/6 log: pass rev_info to git_log_config()Junio C Hamano, Oct 4, 2012
  15. Junio C HamanoOct 4, 2012
  16. Junio C HamanoOct 5, 2012
  17. Jeff KingOct 5, 2012
  18. Junio C HamanoOct 5, 2012
  19. 6/6 log --grep: honor grep.patterntype etc. configuration variablesJunio C Hamano, Oct 4, 2012
  20. Jeff KingOct 4, 2012
  21. Junio C HamanoOct 4, 2012
  22. Jeff KingOct 4, 2012
  23. Junio C HamanoOct 4, 2012

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.