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

[RFC] Running a hook on reset

From
AFAndres Freund <andres@anarazel.de>
Date
Sep 1, 2013, 12:17 UTC
Message-ID
<20130901121711.GC5695@awork2.anarazel.de>
Hi,
I propose adding a hook that is run after git reset.

My personal use case for that is that I am indexing my checkouts using global (a tool similar to ctags, cscope, ...) and I really like that index to be up2date all the time. I can catch most cases where the work tree changes from git via the post-checkout, post-merge, post-rewrite hooks. The only frequent case I don't know how to trigger a reindex is git reset --hard. Another related usecases I can imagine is people wanting to check that there is nothing important/irrecoverable in the current checkout before resetting it, but that would obviously be a pre-reset hook.

Any opinions about the feature before I start writing a patch?
Greetings,
Andres Freund
Message 1 of 1 in “[RFC] Running a hook on reset”
  1. Andres FreundSep 1, 2013

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.