On Wed, Jul 27, 2011 at 04:02:48PM +0700, Nguyen Thai Ngoc Duy wrote: > I was thinking of it as an extension of "git log -Sregex", where as -S > shows full diff of matched files, the new option only shows hunks that > actually match. Not sure if that is really useful though. On the other > hand, "git diff --hunk" is useful for me, I'll see if I can add that > option. I think it is more like "log -Gregex", which actually greps within the diff. It would not be too hard to adapt the "-G" code to return the set of hunks, rather than a simple "yes we have it". If you did that, it would make the perl bits way simpler: they would simply call "diff -Gregex" when creating the patch. I don't think "git diff --hunk" would be that hard, either. The trickiest part is that the diff code tries to output lines as soon as we get them. You'd have to buffer whole chunks. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html