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

Re: [PATCH 0/3] quarantine-push loose ends

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Apr 10, 2017, 22:51 UTC
Message-ID
<CACBZZX6TONCXyCbepDcSQuxoBKJAzVWPrBzUsozg5p2Hj-+JCg@mail.gmail.com>
In-Reply-To
<20170410221058.2ao64wedg2pa6uc2@sigill.intra.peff.net>
On Tue, Apr 11, 2017 at 12:10 AM, Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
> On Mon, Apr 10, 2017 at 05:14:24PM -0400, Jeff King wrote:
>
>> > Also, I think this whole thing could really do with some documentation
>> > in githooks(5). E.g. what hooks does it apply for? The test is just
>> > for pre-receive but the patch changes run_update_hook(), does it also
>> > take effect for update? Ditto the caveat about update-ref.
>>
>> My thinking was that the cases where the effects were user-visible were
>> sufficiently insane that nobody would need to know or care when the
>> feature was in use.
>
> I guess it can't hurt to write about it, though. Here's that, plus a
> cleanup on the stray tmp_objdir_env() call you noticed. The final patch
> provides some safety for the ref-update case. My assumption all along
> has been that nobody would want to update random refs from inside the
> pre-receive hook. This doubles down on that by making it forbidden. I
> don't think that's a big loss, because doing so now is extremely
> dangerous. If that assumption is wrong, the correct path forward is to
> make the quarantining configurable.

Thanks a lot. Cleared up all the questions I have, and now we have permanent docs & more testing for them.

Show 11 quoted lines
>   [1/3]: receive-pack: drop tmp_objdir_env from run_update_hook
>   [2/3]: receive-pack: document user-visible quarantine effects
>   [3/3]: refs: reject ref updates while GIT_QUARANTINE_PATH is set
>
>  Documentation/git-receive-pack.txt | 29 +++++++++++++++++++++++++++++
>  Documentation/githooks.txt         |  3 +++
>  builtin/receive-pack.c             |  1 -
>  refs.c                             |  6 ++++++
>  t/t5547-push-quarantine.sh         | 11 +++++++++++
>  5 files changed, 49 insertions(+), 1 deletion(-)
>
Previous: Jeff King
Message 5 of 5 in “quarantine-push loose ends”
  1. 0/3 quarantine-push loose endsJeff King, Apr 10, 2017
  2. 1/3 receive-pack: drop tmp_objdir_env from run_update_hookJeff King, Apr 10, 2017
  3. 2/3 receive-pack: document user-visible quarantine effectsJeff King, Apr 10, 2017
  4. 3/3 refs: reject ref updates while GIT_QUARANTINE_PATH is setJeff King, Apr 10, 2017
  5. Ævar Arnfjörð BjarmasonApr 10, 2017

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.