The commit-msg misses merges somehow. Which I guess is good for this hook.
authorStephen Haberman <stephen@exigencecorp.com>
Fri, 20 Jun 2008 04:43:02 +0000 (23:43 -0500)
committerStephen Haberman <stephen@exigencecorp.com>
Fri, 20 Jun 2008 04:43:02 +0000 (23:43 -0500)
tests/t1001-client-commit-msg-ticket-merge.sh [new file with mode: 0644]

diff --git a/tests/t1001-client-commit-msg-ticket-merge.sh b/tests/t1001-client-commit-msg-ticket-merge.sh
new file mode 100644 (file)
index 0000000..79cd9f7
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+test_description='client commit-msg ticket enforcer for merges'
+
+. ./test-lib.sh
+
+# setup the commit-msg hook
+install_client_hook 'commit-msg' 'commit-msg'
+
+test_expect_success 'accepts merge' '
+       echo "$test_name" >file &&
+       git add file &&
+       git commit -m "line one. re #3222." &&
+       git checkout -b topic1 &&
+       echo "$test_name topic1" >>file &&
+       git commit -a -m "line two. re #3222." &&
+       git checkout master &&
+       echo "$test_name" > file2 &&
+       git add file2 &&
+       git commit -m "file2. re #3222." &&
+       git merge topic1 &&
+       git log -n 1 HEAD | grep "Merge branch"
+'
+
+test_done
+