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

Re: Why isn't there a hook for all operations that update the working tree?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2011, 02:06 UTC
Message-ID
<7v1ux26icd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CACBZZX7dJhGT0H8JZRbQ_t9mNnJocaktYAXgMSihfLBuFmL3nw@mail.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> ... Is there any
> reason beside omission that there isn't a post-reset hook?
> Or hooks for any other thing ...

In principle, we historically tended to avoid hooks unless absolutely necessary. Even having to check to find out no hook needs to be run is considered wasted cycles.

  http://thread.gmane.org/gmane.comp.version-control.git/79314/focus=79321

I'd especially rather not to see a hook on something as low level as "reset". It would be too tempting to use "reset" itself inside a hook that is run from the post-reset hook, and I do not want to complicate the code even further to give callers to ask disabling the hook.

Previous: Neal Kreitzinger
Message 3 of 3 in “Why isn't there a hook for all operations that update the working tree?”
  1. Ævar Arnfjörð BjarmasonJul 28, 2011
  2. Neal KreitzingerAug 4, 2011
  3. Junio C HamanoAug 4, 2011

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.