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

Re: post-update hook

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 13, 2008, 22:06 UTC
Message-ID
<7vskpvffgi.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<b9fd99020811131048p741cd9aqdcdf4cf410830915@mail.gmail.com>
"Jeremy Ramer" <jdramer@gmail.com> writes:
Show 11 quoted lines
> I had to make one change to this example to get it to work.  I'll put
> it here for completeness
>
> #!/bin/sh
> case "$*" in
> "refs/remotes/origin/master")
>     cd ..
>     GIT_DIR=".git"
>     git merge refs/remotes/origin/master
>     ;;
> esac
Yeah, thanks for correction.  My bad not resetting GIT_DIR.

By the way, I _did_ write these seemingly extra spaces around $* and the refname on purpose.

Previous: Jeremy Ramer
Message 4 of 4 in “post-update hook”
  1. Jeremy RamerNov 13, 2008
  2. Junio C HamanoNov 13, 2008
  3. Jeremy RamerNov 13, 2008
  4. Junio C HamanoNov 13, 2008

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.