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

Re: Feature Request: provide cmdline args to git hooks

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2015, 15:08 UTC
Message-ID
<xmqqwq1e3fy4.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAM-hpQcgOgrAJBAZrH4icDtJMiHUYOz1tynYkoj7qzyVMZ0eVQ@mail.gmail.com>
"Chris O'Kelly" <chris@mapcreative.com.au> writes:
Show 8 quoted lines
> A brief background of my use case:
> I am wanting to write a pre-push hook to prevent tags being pushed to
> our production servers. The production servers in our case are --bare
> endpoints, and when we push a tag at them, they always checkout the
> commit that tag is attached to via some post-receive magic (WPEngine,
> FWIW). This behavior is even present when the tag was already pushed
> to the repo previously, if for instance a normal push is made with the
> --tags argument.

Do you mean that you want to forbid some people from pushing tags into that repository while allowing others (i.e. those who manage production deployment)? If that is the goal, it sounds like that the right place to do this is at the receiving end via pre-receive, not at the sending end via pre-push.

Previous: Chris O'KellyNext: Chris O'Kelly
Message 2 of 6 in “Feature Request: provide cmdline args to git hooks”
  1. Chris O'KellyApr 14, 2015
  2. Junio C HamanoApr 14, 2015
  3. Chris O'KellyApr 14, 2015
  4. Junio C HamanoApr 14, 2015
  5. Chris O'KellyApr 15, 2015
  6. Junio C HamanoApr 15, 2015

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.