Re: [PATCH] Teach "log -F --author=<match>" to behave better
- From
- Teemu Likonen <tlikonen@iki.fi>
- Date
- Sep 4, 2008, 13:33 UTC
- Message-ID
- <20080904133344.GA3197@mithlond.arda.local>
- In-Reply-To
- <7vprnk5n3c.fsf_-_@gitster.siamese.dyndns.org>
Junio C Hamano wrote (2008-09-04 01:31 -0700):
Show 6 quoted lines
> To handle --author=<match> request, the code created a grep > instruction that tried to match a line that begins with 'author ' and > <match> somewhere on the same line. "begins with 'author '" obviously > needs to be expressed with an regexp '^author '. > > When the user specifies --fixed-string, this does not work at all.
> This extends the grep machinery so that a match insn can ignore user > specified --fixed-string request, and uses the '( -e A --and -e B )' > construct from the grep machinery in order to express "has to begin > with '^author ', and also the same line must match the given pattern".
I want to add a side note here because this _may_ be related to what I found almost two months ago:
"Patterns work unexpectedly with 'git log' commit limiting"
http://thread.gmane.org/gmane.comp.version-control.git/88813One of the problems was that with
git log -E --author=pattern
the pattern is interpreted as basic regexp but with
git log --author=pattern -E
as extended rexexp.