Hi,

Scott Kitterman:
> This kind of nonsense is a great reason to stay with svn.
> 
Nah. It's a great reason to teach the tool in question to be *way* more
reasonable. Who needs a single email per commit? Esp. since the number of
actual commits will go way up with increased git usage – feature branches
are easy in git, and more granular commits are a great way to help with
tracking down exactly which change introduced a regression.

An hourly or daily "look what has been committed today" cron job which
sends an email summary is more than sufficient, extremely fast when it
doesn't have to do anything, and ten lines of non-looping shell script;
"git log" has enough options to do any format you want.

Semi-tested proof-of-concept:

#!/bin/sh
BRANCH=${1:-master}
LOG_OPTS="--simplify-merges"
DEST="python-comm...@whatever.com.invalid"

LAST="$(git config commitmail.$BRANCH.last)"
if [ -z "$LAST" ] ; then echo "First call, not emitting anything">&2 ; exit ; fi

HEAD="$(git rev-parse $BRANCH)"
if [ -z "$HEAD" ] ; then echo "Branch '$BRANCH' unknown!">&2 ; exit 1; fi
git config commitmail.$BRANCH.last $HEAD

if [ "$LAST" = "$HEAD ] ; then echo "Nothing changed, exiting">&2 ; exit ; fi
git log $LOG_OPTS $LAST..$HEAD | mail -s "Changes on $BRANCH until $(date)" 
$DEST
#echo "mailed log of $(git log --oneline | wc -l) changesets"

exit 0

-- 
-- Matthias Urlichs


-- 
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140924061450.ga6...@smurf.noris.de

Reply via email to