git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: git@vger.kernel.org
Subject: [RFC] Running a hook on reset
Date: Sun, 1 Sep 2013 14:17:11 +0200	[thread overview]
Message-ID: <20130901121711.GC5695@awork2.anarazel.de> (raw)

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

                 reply	other threads:[~2013-09-01 12:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130901121711.GC5695@awork2.anarazel.de \
    --to=andres@anarazel.de \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).