[PATCH TopGit] hooks/pre-commit.sh: fix bashism

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was introduced in fcb488d51e72c7414f9beb40ad06bf529b8b38dc.
A similar fix was suggested by martin f krafft, too.

Reported-by: Bert Wesarg <bert.wesarg@xxxxxxxxxxxxxx>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
Hello,

this should fix the issue now.

If I don't get negative feed back I will push this change later today.
I'm open for acks, too.

Best regards and thanks
Uwe

 hooks/pre-commit.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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
-- 
1.6.2

-- 
Pengutronix e.K.                              | Uwe Kleine-König            |
Industrial Linux Solutions                    | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux