Subject: [RFC PATCH 0/6] post-rewrite hook and copying notes

From: Thomas Rast <[email-masked]>
Date: Sun, 14 Feb 2010 17:17:05 +0100

This series implements a post-rewrite hook.  This has been on my todo
list since we first got notes, but I never got around to it.

My original intended use-case was to add a note for the source of the
rewritten commit, but recent discussion on git-notes was that we
should add some feature that lets users copy over their notes when
rewriting commits.  The hook in the last patch, together with the 'git
notes copy' command now in 'pu', can achieve this.

I'm not sure whether we should stop here and declare it the user's
responsibility to enable the hook though.  My idea of a "full
integration" approach would be to instead teach 'git notes copy' to
read the same type of lists that I'm handing to post-rewrite, and then
wire calls to it into the scripts in the same places that call
post-rewrite.  Opinions?

Thomas Rast (6):
  Documentation: document post-rewrite hook
  commit --amend: invoke post-rewrite hook
  filter-branch: invoke post-rewrite hook
  rebase: invoke post-rewrite hook
  rebase -i: invoke post-rewrite hook
  contrib: add a hook that copies notes over rewrites

 Documentation/githooks.txt            |   36 +++++++
 builtin-commit.c                      |   43 ++++++++
 contrib/hooks/post-rewrite-copy-notes |   37 +++++++
 git-am.sh                             |   10 ++
 git-filter-branch.sh                  |   10 ++
 git-rebase--interactive.sh            |   41 +++++++-
 git-rebase.sh                         |    5 +
 t/t5407-post-rewrite-hook.sh          |  180 +++++++++++++++++++++++++++++++++
 8 files changed, 361 insertions(+), 1 deletions(-)
 create mode 100644 contrib/hooks/post-rewrite-copy-notes
 create mode 100755 t/t5407-post-rewrite-hook.sh