From: Stephen Haberman Date: Tue, 11 Nov 2008 20:30:59 +0000 (-0600) Subject: Let merges pass the client-side trac hook as they can already pass on the server... X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f1c0cde86caca41bf6d6e15c73091c3010ac7bca;p=git-central.git Let merges pass the client-side trac hook as they can already pass on the server side. --- diff --git a/client/commit-msg-trac b/client/commit-msg-trac index 0800f02..88fec76 100644 --- a/client/commit-msg-trac +++ b/client/commit-msg-trac @@ -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 ] diff --git a/tests/t1001-client-commit-msg-trac-merges.sh b/tests/t1001-client-commit-msg-trac-merges.sh index 80206b5..3cfbd72 100644 --- a/tests/t1001-client-commit-msg-trac-merges.sh +++ b/tests/t1001-client-commit-msg-trac-merges.sh @@ -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