On Thu, Aug 23, 2012 at 09:52:53AM +0200, Noel Grandin <n...@peralex.com> wrote:
> Is it possible to munge the "From:" address in the gerrit emails
> that go to the commit list?
> 
> I got kind of used to seeing who did the commit in the "from" column
> of my email client, and I miss that :-)

The script to hack is:

/git/libreoffice/core.git/hooks/update at people.freedesktop.org, I'm
attaching a trivial diff that could fix the issue (it sets the committer
of the last commit as From, hopefully that's good enough). Michael,
could you please apply it?

Thanks,

Miklos
--- update.orig	2012-08-23 12:18:20.218346617 +0200
+++ update	2012-08-23 12:21:16.997136580 +0200
@@ -72,6 +72,9 @@
 	subject="$repo: $subject"
 fi
 
+# Set from
+from="$(git show -s --pretty="format:%cn <%ce>" $1)"
+
 if expr "$2" : '0*$' >/dev/null
 then
 	# new ref
@@ -134,6 +137,6 @@
 			fi
 		done
 fi |
-mail -s "$subject" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" \
+mail -s "$subject" -r "$from" -a "X-Git-Repository: git://anongit.freedesktop.org/git/ooo-build/ooo-build" \
      -a "List-Post: <mailto:libreoffice@lists.freedesktop.org>" $recipients
 exit 0
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to