From: Stephen Haberman Date: Fri, 20 Jun 2008 04:43:02 +0000 (-0500) Subject: The commit-msg misses merges somehow. Which I guess is good for this hook. X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=645f274ce623526e7e0c82e15eda12684d79765d;p=git-central.git The commit-msg misses merges somehow. Which I guess is good for this hook. --- diff --git a/tests/t1001-client-commit-msg-ticket-merge.sh b/tests/t1001-client-commit-msg-ticket-merge.sh new file mode 100644 index 0000000..79cd9f7 --- /dev/null +++ b/tests/t1001-client-commit-msg-ticket-merge.sh @@ -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 +