From f1c0cde86caca41bf6d6e15c73091c3010ac7bca Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Tue, 11 Nov 2008 14:30:59 -0600 Subject: [PATCH] Let merges pass the client-side trac hook as they can already pass on the server side. --- client/commit-msg-trac | 4 ++++ tests/t1001-client-commit-msg-trac-merges.sh | 9 +++++++++ 2 files changed, 13 insertions(+) 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 -- 2.39.5