From 447cb68110026d76dae15bace74afa696ce77c35 Mon Sep 17 00:00:00 2001 From: Stephen Haberman Date: Thu, 19 Jun 2008 19:28:31 -0500 Subject: [PATCH] Let in no ticket as well. --- client/commit-msg | 2 +- tests/t1000-commit-msg-ticket-hook.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/commit-msg b/client/commit-msg index d617e62..60f638e 100644 --- a/client/commit-msg +++ b/client/commit-msg @@ -1,6 +1,6 @@ #!/bin/sh -grep -i '\(re\|refs\|qa\) #[0-9]\+' "$1" > /dev/null +grep -i '\(\(re\|refs\|qa\) #[0-9]\+\)\|\(no ticket\)' "$1" > /dev/null if [ $? -ne 0 ] then diff --git a/tests/t1000-commit-msg-ticket-hook.sh b/tests/t1000-commit-msg-ticket-hook.sh index 8ec92d0..033f08a 100644 --- a/tests/t1000-commit-msg-ticket-hook.sh +++ b/tests/t1000-commit-msg-ticket-hook.sh @@ -50,5 +50,11 @@ test_expect_success 'accepts with qa' ' git commit -m "first qa #3200" ' +test_expect_success 'accepts with no ticket' ' + echo "$test_name" > file && + git add file && + git commit -m "first no ticket" +' + test_done -- 2.39.5