git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Mar 25, 2009, 11:43 UTC
Message-ID
<1237981384-7857-1-git-send-email-bert.wesarg@googlemail.com>
First I think the '#' is a leftover, second this is now a bashism.
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 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)
Next: martin f krafft
Message 1 of 8 in “hooks/pre-commit.sh: fix it again”
  1. hooks/pre-commit.sh: fix it againBert Wesarg, Mar 25, 2009
  2. martin f krafftMar 25, 2009
  3. Uwe Kleine-KönigMar 25, 2009
  4. Bert WesargMar 25, 2009
  5. Uwe Kleine-KönigMar 25, 2009
  6. hooks/pre-commit.sh: fix bashismUwe Kleine-König, Mar 26, 2009
  7. Marc Kleine-BuddeMar 26, 2009
  8. Bert WesargMar 26, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.