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

Re: git branch based hook desigh

From
MBMagnus Bäck <baeck@google.com>
Date
Mar 20, 2013, 13:46 UTC
Message-ID
<20130320134631.GA7325@google.com>
In-Reply-To
<148C5E2E-8FD6-4686-A009-57D1F403C808@infoservices.in>
On Monday, March 18, 2013 at 00:27 EDT,
     Joydeep Bakshi <joydeep.bakshi@infoservices.in> wrote:
> I have implemented git pre-received hook successfully. And it works on
> the repo level.
> Could anyone suggest how to call branch level hook please ?--

If you need to have different hook behaviors depending on the ref that's about to be updated, just put a conditional in the hook. You get the name(s) of ref(s) to be updated on stdin.

-- 
Magnus Bäck
baeck@google.com
Previous: Joydeep Bakshi
Message 2 of 2 in “git branch based hook desigh”
  1. Joydeep BakshiMar 18, 2013
  2. Magnus BäckMar 20, 2013

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.