[TxMt] diff statistics off by one

Grant Hollingworth grant at antiflux.org
Fri Nov 10 15:59:23 UTC 2006


* Allan Odgaard <throw-away-1 at macromates.com> [2006-11-10 04:13]:
>Thanks, unfortunately for e.g. svn diff, there are two lines above  
>the +++/--- lines. So it seems a better approach would be to  
>explicitly match the lines (and exclude them, i.e. grep -v). That  
>should also make it work with diffs that have patches for multiple  
>files.

Good point.  So something like egrep -v '^(\+\+\+|---) ' would be better.  There's still the unlikely case that someone has added a line that starts with two pluses and a space, or removed a line that starts with two dashes and a space.

Matching more of those lines is tricky.  It's a path and then a date (or a revision for Subversion).  Pretty vague.



More information about the textmate mailing list