Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15
DORMANTno replies

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

From: Bert Wesarg <hidden>
Date: 2016-06-15 22:46:28
Subsystem: the rest · Maintainer: Linus Torvalds

First I think the '#' is a leftover, second this is now a bashism.

Signed-off-by: Bert Wesarg <redacted>

---
 hooks/pre-commit.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hooks/pre-commit.sh b/hooks/pre-commit.sh
index a12cfa6..edf2932 100644
--- a/hooks/pre-commit.sh
+++ b/hooks/pre-commit.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # TopGit - A different patch queue manager
 # (c) Petr Baudis <pasky@suse.cz>  2008
 # GPLv2
@@ -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
-- 
tg: (fcb488d..) bw/fix-hook-again (depends on: master)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help