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

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

From
MKMarc Kleine-Budde <mkl@pengutronix.de>
Date
Mar 26, 2009, 09:29 UTC
Message-ID
<49CB4B12.3020408@pengutronix.de>
In-Reply-To
<20090326090009.GA7570@pengutronix.de>
Uwe Kleine-König wrote:
> This was introduced in fcb488d51e72c7414f9beb40ad06bf529b8b38dc.
> A similar fix was suggested by martin f krafft, too.
Works here on ubuntu bin /bin/sh is a link to /bin/dash
> 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>
Show 27 quoted lines
> ---
> 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
Marc
-- 
Pengutronix e.K.                         | Marc Kleine-Budde           |
Linux Solutions for Science and Industry | Phone: +49-231-2826-924     |
Vertretung West/Dortmund                 | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686         | http://www.pengutronix.de   |
Previous: Uwe Kleine-KönigNext: Bert Wesarg
Message 7 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.