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

Why does "git log --author=<pattern>" not work with "regexp-ignore-case" and other regexp-related options?

From
TFTim Friske <me@tifr.de>
Date
Apr 19, 2015, 08:29 UTC
Message-ID
<55336775.2020000@tifr.de>
Hi,

I wonder why "git log --author=<pattern>" does not work with the "regexp-ignore-case" option and the other regexp-related options? Wouldn't it be useful to make the "author=<pattern>" option support the following options?

  * basic-regexp
  * extended-regexp
  * fixed-strings
  * perl-regexp

In the same way "git log --committer=<pattern>" cannot be combined with any of the above options.

I tried to find out which regexp dialect to use for the "<pattern>" argument that must be passed to the "author" and "committer" options but without luck. The git-log(1) manual page just states for these options "... that match the specified pattern (regular expression)".

Given a commit with the following headers:
Author: Tim Friske <me@tifr.de>
Commit: Tim Friske <me@tifr.de>

When running "git log --author='tim|friske' --regexp-ignore-case" I would expect a match because lower- and upper case characters are treated as equal.

When running "git --log --author='Tim|Friske' --fixed-strings" I would expect *no* match because the string 'Tim|Friske' should be taken literally and not be interpreted as a pattern.

When running "git --log --author='Tim|Friske' --basic-regexp" I would expect *no* match because basic regular expression syntax does not support "|" alternation.

Wouldn't it be nice to have all of the above options collaborate with each other?

BR Tim

Next: Junio C Hamano
Message 1 of 2 in “Why does "git log --author=<pattern>" not work with "regexp-ignore-case" and other regexp-related options?”
  1. Tim FriskeApr 19, 2015
  2. Junio C HamanoApr 20, 2015

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.