From fcb488d51e72c7414f9beb40ad06bf529b8b38dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 24 Mar 2009 22:16:48 +0100 Subject: [PATCH] hooks/pre-commit.sh: don't stop commits on non-topgit branches MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is a regression introduced by c32d1dd4fcafad3f9c570adeda580a90d56 "${head_#refs/heads/#refs/top-bases#}" doesn't substitute refs/heads by refs/top-bases, but strips the prefix of $head_ if it starts with "refs/heads/#refs/top-bases#". Signed-off-by: Uwe Kleine-König --- hooks/pre-commit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh index 52d201e..a12cfa6 100644 --- a/hooks/pre-commit.sh +++ b/hooks/pre-commit.sh @@ -20,7 +20,7 @@ tg_util if head_=$(git symbolic-ref -q HEAD); then case "$head_" in refs/heads/*) - git rev-parse -q --verify "${head_#refs/heads/#refs/top-bases#}" >/dev/null || exit 0;; + git rev-parse -q --verify "${head_/#refs\/heads/refs\/top-bases}" >/dev/null || exit 0;; *) exit 0;; esac -- 2.30.2