Re: git-feed-mail-list.sh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Woodhouse <dwmw2@xxxxxxxxxxxxx> writes:

> # $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..

> # 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
> fi

Maybe you meant 'if test -n "$GIT_COMMITTER_EMAIL"' here?

> # takes an object and generates the object's parent(s)
> createmail () {
>     local commit

If 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...

> 	git-diff -B $parent $commit > $TMPCM
> 	diffstat -p1 $TMPCM 2>/dev/null

With GIT 1.3.0 and later:

	git diff --patch-with-stat $parent..$commit

would be simpler here.

> base=$(git-rev-parse $1)
>
> if [ -z $2 ]; then
>     lastmail=`cat $MAILTAG`
> else
>     lastmail=$(git-rev-parse $2)
> fi

lastmail=`git rev-parse --default "$MAILTAG" ${2+"$2"}`

> if [ -z $1 ]; then
>     base=$(git-rev-parse HEAD) || exit 1
> else
>     base=$(git-rev-parse $1) || exit 1
> fi

I am not sure if earlier base=$(git-rev-parse $1) is needed if
you do this here...

-
: 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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]