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

Re: GIT_PUSH_CERT* env vars and update/post-update hooks...

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 29, 2014, 16:36 UTC
Message-ID
<xmqqa9261kgx.fsf@gitster.dls.corp.google.com>
In-Reply-To
<549A1D8A.3020106@gmail.com>
Sitaram Chamarty <sitaramc@gmail.com> writes:
> Any chance I could persuade you to set the GIT_PUSH_CERT* environment
> variables for the update (and post-update) hooks also?

I do not think of a fundamental reason why we shouldn't give these environment variables to update or other hooks. It should just be the matter of calling prepare_push_cert_sha1() on the child_process struct used to run the hooks you want.

> [1]: because it's nice to *selectively* reject refs when more than one
> ref is pushed at the same time; pre-receive is "all or none".

It cuts both ways; inside "update", your "selective" rejection cannot make the decision with the whole picture (you only have a peephole into individual changes). "post-receive" sees the whole picture, but it has to say all-or-none. Neither is ideal if you truly want a useful "selective".

Previous: Sitaram Chamarty
Message 2 of 2 in “GIT_PUSH_CERT* env vars and update/post-update hooks...”
  1. Sitaram ChamartyDec 24, 2014
  2. Junio C HamanoDec 29, 2014

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.