chiark / gitweb /
hooks/pre-commit.sh: fix bashism
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 26 Mar 2009 08:52:26 +0000 (09:52 +0100)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 26 Mar 2009 21:10:52 +0000 (22:10 +0100)
This was introduced in fcb488d51e72c7414f9beb40ad06bf529b8b38dc.
A similar fix was suggested by martin f krafft, too.

Reported-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Bert Wesarg <bert.wesarg@googlemail.com>
Tested-by: Bert Wesarg <bert.wesarg@googlemail.com>
hooks/pre-commit.sh

index a12cfa6..9d677e9 100644 (file)
@@ -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