From: Petr Baudis Date: Thu, 04 Sep 2008 14:09:02 GMT Subject: Re: [PATCH] Teach "log -F --author=" to behave better Message-ID: <20080904140902.GY10544@machine.or.cz> In-Reply-To: <7vprnk5n3c.fsf_-_@gitster.siamese.dyndns.org> On Thu, Sep 04, 2008 at 01:31:19AM -0700, Junio C Hamano wrote: > To handle --author= request, the code created a grep instruction > that tried to match a line that begins with 'author ' and > 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 Wow, this is clever solution! FWIW, Acked-by: Petr Baudis There goes one of my long-standing TODO items. :-)