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

Re: Post-update hook problems

From
Mike Ralphson <mike.ralphson@gmail.com>
Date
Oct 5, 2007, 12:27 UTC
Message-ID
<e2b179460710050527w185fd4b1kfbe278cf7055de4c@mail.gmail.com>
In-Reply-To
<20071005120850.GM31659@planck.djpig.de>
On 10/5/07, Frank Lichtenheld <frank@lichtenheld.de> wrote:
Show 12 quoted lines
> On Fri, Oct 05, 2007 at 12:27:22PM +0100, Geoffrey Ferrari wrote:
> > --
> > fatal: Not a git repository: '.'
> > Failed to find a valid git directory.
> > --
> >
> > Can anyone explain why this happens? And how can I make the script
> > work properly?
>
> I'm no hook expert, but it may have something to do with some
> environment variables that are set in hooks, you might need to change
> variables like GIT_DIR.
Ack.

The hooks seem to assume repositories pushed into are bare, so the GIT_DIR isn't set to a .git subdirectory (even if it exists).

Mike
Previous: Frank Lichtenheld
Message 3 of 3 in “Post-update hook problems”
  1. Geoffrey FerrariOct 5, 2007
  2. Frank LichtenheldOct 5, 2007
  3. Mike RalphsonOct 5, 2007

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.