git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-feed-mail-list.sh

From
Junio C Hamano <junkio@cox.net>
Date
May 4, 2006, 04:35 UTC
Message-ID
<7vmzdy9zl2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1146678513.20773.45.camel@pmac.infradead.org>
David Woodhouse <dwmw2@infradead.org> 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..
Show 8 quoted lines
> # 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.
Show 7 quoted lines
> 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"}`
Show 5 quoted lines
> 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...

Previous: David WoodhouseNext: Junio C Hamano
Message 2 of 24 in “git-feed-mail-list.sh”
  1. David WoodhouseMay 3, 2006
  2. Junio C HamanoMay 4, 2006
  3. Junio C HamanoMay 4, 2006
  4. David WoodhouseMay 8, 2006
  5. Linus TorvaldsMay 9, 2006
  6. David WoodhouseMay 9, 2006
  7. Junio C HamanoMay 9, 2006
  8. Bertrand JacquinMay 9, 2006
  9. Junio C HamanoMay 9, 2006
  10. Bertrand JacquinMay 9, 2006
  11. Linus TorvaldsMay 9, 2006
  12. David WoodhouseMay 9, 2006
  13. Junio C HamanoMay 9, 2006
  14. David WoodhouseMay 9, 2006
  15. Martin MaresMay 10, 2006
  16. Linus TorvaldsMay 9, 2006
  17. Bertrand JacquinMay 9, 2006
  18. Junio C HamanoMay 9, 2006
  19. Bertrand JacquinMay 9, 2006
  20. Junio C HamanoMay 9, 2006
  21. Linus TorvaldsMay 9, 2006
  22. Junio C HamanoMay 9, 2006
  23. Linus TorvaldsMay 9, 2006
  24. Junio C HamanoMay 9, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.