Re: git-feed-mail-list.sh
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:25
Junio C Hamano [off-list ref] writes:
David Woodhouse [off-list ref] writes:quoted
# $FROM specifies the From: header used in the mails. It'll default # to GIT_COMMITTER_EMAIL if that exists, or to `whoami`@`hostname`I am not sure if this part is tested..quoted
# Unless configured otherwise, just cat it instead of mailing. if [ -z "$FROM" ]; then if [ -z "$GIT_COMMITTER_EMAIL" ]; then FROM="$GIT_COMMITTER_EMAIL" else FROM=`whoami`@`hostname` fi fiMaybe you meant 'if test -n "$GIT_COMMITTER_EMAIL"' here?quoted
# takes an object and generates the object's parent(s) createmail () { local commitIf you were to do bashism local, don't you want to also localize other variables like key, SUBHEX, NEWSUB,...? It may make sense to enhance format-patch to do the Q encoding, so that you do not have to do this part by hand...quoted
git-diff -B $parent $commit > $TMPCM diffstat -p1 $TMPCM 2>/dev/nullWith GIT 1.3.0 and later: git diff --patch-with-stat $parent..$commit would be simpler here.
Or at least lose "diffstat -p1" and replace it with git-apply --stat --status which would be more pleasant.
quoted
if [ -z $2 ]; then lastmail=`cat $MAILTAG` else lastmail=$(git-rev-parse $2) filastmail=`git rev-parse --default "$MAILTAG" ${2+"$2"}`
As I wrote it this is broken, sorry. This assumes you stop doing "MAILTAG=.git/refs/tags/MailDone" by hand and lose "do we have GIT_DIR" logic as well. Instead define MAILTAG=tags/MailDone or maybe refs/tags/MailDone and let "git rev-parse --default refs/tags/MailDone" figure out what to do when GIT_DIR is set or unset.