Re: [PATCH] Teach "log -F --author=<match>" to behave better
On Thu, Sep 04, 2008 at 01:31:19AM -0700, Junio C Hamano wrote:
Show 13 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".
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Wow, this is clever solution! FWIW,
Acked-by: Petr Baudis <pasky@suse.cz>
There goes one of my long-standing TODO items. :-)