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

Re: [PATCH] [RFC] Make git-update-ref invoke the update and post-update hooks

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 15, 2015, 21:45 UTC
Message-ID
<xmqqd20w7ii4.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAEJ-0i8mfabWoLivX_ZJHRJBYFftoENWmHw5__CGphK54oOpug@mail.gmail.com>
Brian Vandenberg <phantall@gmail.com> writes:
> Would you be less doubtful about adding a lower-level hook for
> update-ref?  Or in lieu of that, a config option that can affect the
> behavior of its "-m" and "-d" options?
Not really.

Those who want to bypass your policy can use "vi .git/packed-refs" and/or "rm .git/refs/heads/foo"; you would not propose to patch "rm" and "vi" to pay attention to git configuration, because they are not about "git" at all, and there are cases where these bare-metal level editing of repositories is necessary. You would instead tell them "don't do that".

When I say "update-ref is a low-level plumbing command that should not enforce policy", I am suggesting you to treat the command just like you would treat "rm" and "vi".

Previous: Brian VandenbergNext: Brian Vandenberg
Message 4 of 5 in “Re: [PATCH] [RFC] Make git-update-ref invoke the update and post-update hooks”
  1. Brian VandenbergJun 15, 2015
  2. Junio C HamanoJun 15, 2015
  3. Brian VandenbergJun 15, 2015
  4. Junio C HamanoJun 15, 2015
  5. Brian VandenbergJun 16, 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.