From 645f274ce623526e7e0c82e15eda12684d79765d Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Thu, 19 Jun 2008 23:43:02 -0500 Subject: [PATCH] The commit-msg misses merges somehow. Which I guess is good for this hook. --- tests/t1001-client-commit-msg-ticket-merge.sh | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/t1001-client-commit-msg-ticket-merge.sh 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 + -- 2.39.5