set_change_type
set_rev_types
- set_describe
+ set_describe_tags
# The revision type tells us what type the commit is, combined with
# the location of the ref we can decide between
cat <<-EOF
From: $USER_EMAIL
To: $recipients
- Subject: ${emailprefix} $short_refname $refname_type ${change_type}d. $describe
+ Subject: ${emailprefix} $short_refname $refname_type ${change_type}d. $describe_tags
X-Git-Refname: $refname
X-Git-Reftype: $refname_type
X-Git-Oldrev: $oldrev
--- /dev/null
+From: author@example.com
+To: commits@list.com
+Subject: [cbas] master branch updated. r/1000
+X-Git-Refname: refs/heads/master
+X-Git-Reftype: branch
+X-Git-Oldrev: $old_commit_hash
+X-Git-Newrev: $new_commit_hash
+
+The branch, master has been updated
+ via $new_commit_abbrev simple commit with commitnumber
+ from $old_commit_abbrev simple commit
+
+Those revisions listed above that are new to this repository have
+not appeared on any other notification email; so we list those
+revisions in full, below.
+
+- Log -----------------------------------------------------------------
+
+commit $new_commit_hash
+Author: A U Thor <author@example.com>
+Date: $new_commit_date
+
+ simple commit with commitnumber
+
+$new_commit_hash
+diff --git a/a b/a
+index b38f23c..bd6aaf6 100644
+--- a/a
++++ b/a
+@@ -1 +1 @@
+-simple commit
++simple commit with commitnumber
+
+-----------------------------------------------------------------------
+
+Summary of changes:
+ a | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
test_cmp 1.txt server/.git/refs.heads.master.out
'
+test_expect_success 'simple commit with commitnumber' '
+ old_commit_hash=$(git rev-parse HEAD) &&
+ old_commit_abbrev=$(git rev-parse --short HEAD) &&
+
+ echo $test_name >a &&
+ git commit -a -m "$test_name" &&
+ git tag r/1000 &&
+ git push --tags &&
+ git push &&
+ new_commit_hash=$(git rev-parse HEAD) &&
+ new_commit_date=$(git log -n 1 --pretty=format:%cd HEAD) &&
+ new_commit_abbrev=$(git rev-parse --short HEAD) &&
+
+ interpolate ../t2200-2.txt 2.txt old_commit_hash old_commit_abbrev new_commit_hash new_commit_date new_commit_abbrev &&
+ test_cmp 2.txt server/.git/refs.heads.master.out
+'
+
test_done
From: author@example.com
To: commits@list.com
-Subject: [cbas] 2.1 tag created. $new_commit_describe
+Subject: [cbas] 2.1 tag created. 2.1
X-Git-Refname: refs/tags/2.1
X-Git-Reftype: tag
X-Git-Oldrev: 0000000000000000000000000000000000000000
From: author@example.com
To: commits@list.com
-Subject: [cbas] 2.1 tag updated. $new_commit_describe
+Subject: [cbas] 2.1 tag updated. 2.1
X-Git-Refname: refs/tags/2.1
X-Git-Reftype: tag
X-Git-Oldrev: $old_commit_hash