The email script should have full coverage now--refactoring can commence.
was $old_commit_hash
-----------------------------------------------------------------------
-$old_commit_hash update branch with existing commits does not replay them on topic
+$old_commit_hash rewind and continue branch on topic
-----------------------------------------------------------------------
--- /dev/null
+From: author@payflex.com
+To: commits@list.com
+Subject: [cbas] topic branch updated. $new_commit_hash
+X-Git-Refname: refs/heads/topic
+X-Git-Reftype: branch
+X-Git-Oldrev: $old_commit_hash
+X-Git-Newrev: $new_commit_hash
+
+The branch, topic has been updated
+ discards $old_commit_hash (commit)
+
+This update discarded existing revisions and left the branch pointing at
+a previous point in the repository history.
+
+ * -- * -- N ($new_commit_hash)
+ \
+ O -- O -- O ($old_commit_hash)
+
+The removed revisions are not necessarilly gone - if another reference
+still refers to them they will stay in the repository.
+
+No new revisions were added by this update.
+
+Summary of changes:
+ a | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/a b/a
+index 5c0be09..8516a40 100644
+--- a/a
++++ b/a
+@@ -1 +1 @@
+-update branch with existing commits does not replay them
++create branch 2
+
+
+hooks/post-receive
+--
+cbas
--- /dev/null
+From: author@payflex.com
+To: commits@list.com
+Subject: [cbas] topic branch updated. $new_commit_hash
+X-Git-Refname: refs/heads/topic
+X-Git-Reftype: branch
+X-Git-Oldrev: $old_commit_hash
+X-Git-Newrev: $new_commit_hash
+
+The branch, topic has been updated
+ discards $old_commit_hash (commit)
+ via $new_commit_hash (commit)
+
+This update added new revisions after undoing existing revisions. That is
+to say, the old revision is not a strict subset of the new revision. This
+situation occurs when you --force push a change and generate a repository
+containing something like this:
+
+ * -- * -- B -- O -- O -- O ($old_commit_hash)
+ \
+ N -- N -- N ($new_commit_hash)
+
+When this happens we assume that you've already had alert emails for all
+of the O revisions, and so we here report only the revisions in the N
+branch from the common base, B.
+
+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
+
+ rewind and continue branch on topic
+
+-----------------------------------------------------------------------
+
+Summary of changes:
+ a | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/a b/a
+index 8516a40..a30ab5b 100644
+--- a/a
++++ b/a
+@@ -1 +1 @@
+-create branch 2
++rewind and continue branch
+
+
+hooks/post-receive
+--
+cbas
test_cmp 4.txt server/.git/refs.heads.topic.out
'
+test_expect_success 'rewind branch' '
+ git checkout topic &&
+ old_commit_hash=$(git rev-parse HEAD) &&
+
+ git reset --hard HEAD^ &&
+ git push --force &&
+ new_commit_hash=$(git rev-parse HEAD) &&
+
+ interpolate ../t2202-5.txt 5.txt old_commit_hash new_commit_hash &&
+ test_cmp 5.txt server/.git/refs.heads.topic.out
+'
+
+test_expect_success 'rewind and continue branch' '
+ git checkout topic &&
+ old_commit_hash=$(git rev-parse HEAD) &&
+
+ git reset --hard HEAD^ &&
+ echo "$test_name" >a &&
+ git commit -a -m "$test_name on topic" &&
+ new_commit_hash=$(git rev-parse HEAD) &&
+ new_commit_date=$(git log -n 1 --pretty=format:%cd HEAD) &&
+
+ git push --force &&
+ interpolate ../t2202-6.txt 6.txt old_commit_hash new_commit_hash new_commit_date &&
+ test_cmp 6.txt server/.git/refs.heads.topic.out
+'
+
test_expect_success 'delete branch' '
old_commit_hash=$(git rev-parse HEAD) &&
git push origin :refs/heads/topic &&