[sysadmin-bin: 5/168] Use a short identifier in the Subject line
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 5/168] Use a short identifier in the Subject line
- Date: Thu, 24 May 2012 19:51:52 +0000 (UTC)
commit 782ef1b806dda714817a30ccc505e519be1c874c
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Jan 27 17:00:01 2009 -0500
Use a short identifier in the Subject line
Use the abbreviated directory name (/git/gitadminbin.bit => gitadmin-bin)
in the Subject line rather than the project description.
post-receive-email | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/post-receive-email b/post-receive-email
index a524bc4..9428a76 100755
--- a/post-receive-email
+++ b/post-receive-email
@@ -187,7 +187,7 @@ generate_email_header()
cat <<-EOF
To: $recipients
From: $USER src gnome org
- Subject: ${emailprefix}$projectdesc $refname_type, $short_refname, ${change_type}d. $describe
+ Subject: ${emailprefix}$projectshort $refname_type, $short_refname, ${change_type}d. $describe
X-Git-Refname: $refname
X-Git-Reftype: $refname_type
X-Git-Oldrev: $oldrev
@@ -616,6 +616,9 @@ if [ -z "$GIT_DIR" ]; then
exit 1
fi
+# Use the directory name with .git stripped as a short identifier
+projectshort=$(basename ${GIT_DIR%.git})
+
projectdesc=$(sed -ne '1p' "$GIT_DIR/description")
# Check if the description is unchanged from it's default, and shorten it to
# a more manageable length if it is
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]