Adding diffs to commit-mail on the fly
Giorgos Keramidas <keramida <at> FreeBSD.org>
2002-06-01 01:17:54 GMT
Hi Matt and everyone,
I remember that Matt had mentioned adding diffs of the commits to the
commit-mail, which would make it possible to quickly view what changed
without leaving the MUA and manually searching for the proper CVS
diff/rdiff incantation to view the diff.
The idea was resting at the back of my mind, and tonight I hacked this
Perl script that seems to mostly do what I want, when I pipe a single
message to it's STDIN in mbox format. Given a script in Perl or awk
or whatever that works like this one, how would you all integrate this
with procmail to let it filter all the commit mail of FreeBSD?
The code of the script is a bit clumsily written, but here it is for
anyone who cares to play with it. You can see a sample of the output
of this script, in mbox file format, at:
# A filter that copies all the lines from stdin unchanged, until it
# matches the magic FreeBSD commit-mail line that says files and
# revisions follow. When that line is matched, do our stuff until the
# line that matches /^$/; when all file changes are finished.
# If this is set to non-zero, then trim EOL whitespace from the