From: Uwe Kleine-König Date: Thu, 26 Mar 2009 08:52:26 +0000 (+0100) Subject: hooks/pre-commit.sh: fix bashism X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=commitdiff_plain;h=9f685cd79b36ff9459f2d1d8ba0c21fa8875ffad hooks/pre-commit.sh: fix bashism This was introduced in fcb488d51e72c7414f9beb40ad06bf529b8b38dc. A similar fix was suggested by martin f krafft, too. Reported-by: Bert Wesarg Signed-off-by: Uwe Kleine-König Tested-by: Marc Kleine-Budde Acked-by: Bert Wesarg Tested-by: Bert Wesarg --- diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh index a12cfa6..9d677e9 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 "refs/top-bases${head_#refs/heads}" >/dev/null || exit 0;; *) exit 0;; esac