summaryrefslogtreecommitdiff
path: root/Documentation/githooks.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-03-24 23:26:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-03-24 23:26:43 (GMT)
commita86ed83cce0fc0b9a9fe4e17ac1bf4f719028d20 (patch)
treeb601185c28e5ea4f4a624debe01427465147650c /Documentation/githooks.txt
parentb6a7a06aa6f083f21b0fca2558c737324eda1602 (diff)
parent66d681998411e8e5034080d5267a5e0f6cdc0c17 (diff)
downloadgit-a86ed83cce0fc0b9a9fe4e17ac1bf4f719028d20.zip
git-a86ed83cce0fc0b9a9fe4e17ac1bf4f719028d20.tar.gz
git-a86ed83cce0fc0b9a9fe4e17ac1bf4f719028d20.tar.bz2
Merge branch 'tr/notes-display'
* tr/notes-display: git-notes(1): add a section about the meaning of history notes: track whether notes_trees were changed at all notes: add shorthand --ref to override GIT_NOTES_REF commit --amend: copy notes to the new commit rebase: support automatic notes copying notes: implement helpers needed for note copying during rewrite notes: implement 'git notes copy --stdin' rebase -i: invoke post-rewrite hook rebase: invoke post-rewrite hook commit --amend: invoke post-rewrite hook Documentation: document post-rewrite hook Support showing notes from more than one notes tree test-lib: unset GIT_NOTES_REF to stop it from influencing tests Conflicts: git-am.sh refs.c
Diffstat (limited to 'Documentation/githooks.txt')
-rw-r--r--Documentation/githooks.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 87e2c03..7183aa9 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -317,6 +317,44 @@ This hook is invoked by 'git gc --auto'. It takes no parameter, and
exiting with non-zero status from this script causes the 'git gc --auto'
to abort.
+post-rewrite
+~~~~~~~~~~~~
+
+This hook is invoked by commands that rewrite commits (`git commit
+--amend`, 'git-rebase'; currently 'git-filter-branch' does 'not' call
+it!). Its first argument denotes the command it was invoked by:
+currently one of `amend` or `rebase`. Further command-dependent
+arguments may be passed in the future.
+
+The hook receives a list of the rewritten commits on stdin, in the
+format
+
+ <old-sha1> SP <new-sha1> [ SP <extra-info> ] LF
+
+The 'extra-info' is again command-dependent. If it is empty, the
+preceding SP is also omitted. Currently, no commands pass any
+'extra-info'.
+
+The hook always runs after the automatic note copying (see
+"notes.rewrite.<command>" in linkgit:git-config.txt) has happened, and
+thus has access to these notes.
+
+The following command-specific comments apply:
+
+rebase::
+ For the 'squash' and 'fixup' operation, all commits that were
+ squashed are listed as being rewritten to the squashed commit.
+ This means that there will be several lines sharing the same
+ 'new-sha1'.
++
+The commits are guaranteed to be listed in the order that they were
+processed by rebase.
+
+There is no default 'post-rewrite' hook, but see the
+`post-receive-copy-notes` script in `contrib/hooks` for an example
+that copies your git-notes to the rewritten commits.
+
+
GIT
---
Part of the linkgit:git[1] suite