From: Jeff King Date: Fri, 06 May 2011 22:29:51 GMT Subject: Re: [PATCH 1/2] tests: eliminate unnecessary setup test assertions Message-ID: <20110506222951.GA24474@sigill.intra.peff.net> In-Reply-To: <7voc3fxy6b.fsf@alter.siamese.dyndns.org> On Fri, May 06, 2011 at 03:27:08PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > Two minor complaints on git-blame; maybe somebody can point out > > something clever I've missed. > > > 1. blame's "-L" understands patterns already. > > Teaching blame to take multiple -L options has been one of many > longstanding todo item for me. Someday. I think multiple -L is not quite enough. I want a single "-L" that matches every instance of a pattern, like: -L "/ ()/,+0" > > 2. Parsing the human-readable output blame output sucks. But parsing > > --porcelain is annoyingly complex for quick-and-dirty things like > > this. It doesn't repeat the commit information per-line. > > Non-repetition was quite deliberate, as the reader was expected to have > memory proportional to the number of lines in the range, but I agree it is > not friendly for quick and dirty hack. > > You should be able to add a command line option that disables the early > return at the beginning of emit_one_suspect_detail() with a 5-6 lines of > patch. I tried that, and it is slightly more involved. You also need to break a multi-line run of lines that blame to a single suspect into its constituent lines. I am 75% of the way to such a patch if you are interested. It's not a lot of code, but it takes some refactoring of emit_porcelain. -Peff