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

Possible bug: hooks/post-update does not trigger

From
TLTeemu Likonen <tlikonen@iki.fi>
Date
May 17, 2008, 15:28 UTC
Message-ID
<20080517152816.GA23308@mithlond.arda.local>

Sort of a problem is that hooks/post-update script is never triggered. I have the following setup:

I work on a local repository and publish my changes by pushing them into a bare repository which lies on the same filesystem. The actual publishing will then require "git update-server-info" and rsync'ing the bare repository to another host which in turn serves the repo via http. (No git installed on the remote side and probably never will.)

I want to make this process automatical and I have actually done it already with hooks/post-receive. It works fine. I'm just wondering why hooks/post-update doesn't work.

The default hooks/post-update contains the line
  exec git-update-server-info

So the file is sort of advertised being the "official" way of running git-update-server-info. The problem is that on my bare repository side that file never gets executed (yes, execute bits are on). I tried to put "echo" and "touch stampfile" type commands there but nothing happens.

Well, my problem was solved simply by using hooks/post-receive instead. I put the following lines there and it works great:

  git update-server-info
  rsync --recursive --delete . remotehost:public_html/repo.git

Still I'd like to know if there is a bug in hooks/post-update triggering mechanism or did I do something wrong?

Message 1 of 1 in “Possible bug: hooks/post-update does not trigger”
  1. Teemu LikonenMay 17, 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.