Let merges pass the client-side trac hook as they can already pass on the server...
authorStephen Haberman <stephen@exigencecorp.com>
Tue, 11 Nov 2008 20:30:59 +0000 (14:30 -0600)
committerStephen Haberman <stephen@exigencecorp.com>
Tue, 11 Nov 2008 20:30:59 +0000 (14:30 -0600)
client/commit-msg-trac
tests/t1001-client-commit-msg-trac-merges.sh

index 0800f02..88fec76 100644 (file)
@@ -1,5 +1,9 @@
 #!/bin/sh
 
+if test -f $GIT_DIR/MERGE_MSG ; then
+       exit 0
+fi
+
 grep -i '\(\(re\|refs\|qa\) #[0-9]\+\)\|\(no ticket\)' "$1" > /dev/null
 
 if [ $? -ne 0 ]
index 80206b5..3cfbd72 100644 (file)
@@ -22,5 +22,14 @@ test_expect_success 'accepts merge' '
        git log -n 1 HEAD | grep "Merge branch"
 '
 
+test_expect_success 'accepts hand-editted merge' '
+       git checkout topic1 &&
+       echo "$test_name" >>file &&
+       git commit -a -m "line three. re #3222." &&
+       git checkout master &&
+       git merge --no-ff --no-commit topic1 &&
+       git commit -F .git/MERGE_MSG
+'
+
 test_done