public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Tim Friske <me@tifr•de>
To: git <git@vger•kernel.org>
Subject: Why does "git log --author=<pattern>" not work with "regexp-ignore-case" and other regexp-related options?
Date: Sun, 19 Apr 2015 10:29:41 +0200	[thread overview]
Message-ID: <55336775.2020000@tifr.de> (raw)

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

             reply	other threads:[~2015-04-19  8:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-19  8:29 Tim Friske [this message]
2015-04-20  5:59 ` Why does "git log --author=<pattern>" not work with "regexp-ignore-case" and other regexp-related options? Junio C Hamano

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=55336775.2020000@tifr.de \
    --to=me@tifr$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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