[sysadmin-bin: 30/168] Improve cover email subject for a single commit cover letter
- From: Andrea Veri <av src gnome org>
- To: gnome-sysadmin gnome org,commits-list gnome org
- Subject: [sysadmin-bin: 30/168] Improve cover email subject for a single commit cover letter
- Date: Thu, 24 May 2012 19:53:58 +0000 (UTC)
commit 704be630a331edde769df58b3f62d6291dacb457
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 2 17:25:11 2009 -0500
Improve cover email subject for a single commit cover letter
If we are only showing a single commit in the cover letter, make
the subject
[foo] Subject of commit
Not:
[foo] ...Subject of commit
gnome-post-receive-email | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnome-post-receive-email b/gnome-post-receive-email
index 29f5bfd..eb12eab 100755
--- a/gnome-post-receive-email
+++ b/gnome-post-receive-email
@@ -533,7 +533,11 @@ class BranchUpdate(BranchChange):
# [myproject/spiffy-stuff] (18 commits) ...Merge branch master
#
last_commit = self.added_commits[-1]
- return self.get_count_string() + "..." + last_commit.subject[0:50]
+ if len(self.added_commits) > 1:
+ return self.get_count_string() + "..." + last_commit.subject[0:50]
+ else:
+ # The ... indicates we are only showing one of many, don't need it for a single commit
+ return last_commit.subject[0:50]
def generate_body_normal(self, out):
print >>out, s("""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]