summaryrefslogtreecommitdiffstats
path: root/githooks.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2009-09-08 00:55:23 +0000
committerJunio C Hamano <junio@hera.kernel.org>2009-09-08 00:55:23 +0000
commitc28068f42827f92c7c73c184e4fd11ceba0c73da (patch)
tree2ea9bf073e1f773ca1fcfb8bf76ec28ead3687e4 /githooks.html
parent35b47ca5285a4059792ba937f8e09b2ab4a7adf4 (diff)
downloadgit-htmldocs-c28068f42827f92c7c73c184e4fd11ceba0c73da.tar.gz
Autogenerated HTML docs for v1.6.5-rc0
Diffstat (limited to 'githooks.html')
-rw-r--r--githooks.html105
1 files changed, 63 insertions, 42 deletions
diff --git a/githooks.html b/githooks.html
index 428fe4209..d81117d11 100644
--- a/githooks.html
+++ b/githooks.html
@@ -342,8 +342,9 @@ executable by default.</td>
</div>
<div class="para"><p>This document describes the currently defined hooks.</p></div>
</div>
-<h2 id="_applypatch_msg">applypatch-msg</h2>
+<h2 id="_hooks">HOOKS</h2>
<div class="sectionbody">
+<h3 id="_applypatch_msg">applypatch-msg</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-am</em> script. It takes a single
parameter, the name of the file that holds the proposed commit
log message. Exiting with non-zero status causes
@@ -354,9 +355,7 @@ format (if the project has one). It can also be used to refuse
the commit after inspecting the message file.</p></div>
<div class="para"><p>The default <em>applypatch-msg</em> hook, when enabled, runs the
<em>commit-msg</em> hook, if the latter is enabled.</p></div>
-</div>
-<h2 id="_pre_applypatch">pre-applypatch</h2>
-<div class="sectionbody">
+<h3 id="_pre_applypatch">pre-applypatch</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-am</em>. It takes no parameter, and is
invoked after the patch is applied, but before a commit is made.</p></div>
<div class="para"><p>If it exits with non-zero status, then the working tree will not be
@@ -365,16 +364,12 @@ committed after applying the patch.</p></div>
make a commit if it does not pass certain test.</p></div>
<div class="para"><p>The default <em>pre-applypatch</em> hook, when enabled, runs the
<em>pre-commit</em> hook, if the latter is enabled.</p></div>
-</div>
-<h2 id="_post_applypatch">post-applypatch</h2>
-<div class="sectionbody">
+<h3 id="_post_applypatch">post-applypatch</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-am</em>. It takes no parameter,
and is invoked after the patch is applied and a commit is made.</p></div>
<div class="para"><p>This hook is meant primarily for notification, and cannot affect
the outcome of <em>git-am</em>.</p></div>
-</div>
-<h2 id="_pre_commit">pre-commit</h2>
-<div class="sectionbody">
+<h3 id="_pre_commit">pre-commit</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-commit</em>, and can be bypassed
with <tt>--no-verify</tt> option. It takes no parameter, and is
invoked before obtaining the proposed commit log message and
@@ -386,9 +381,7 @@ such a line is found.</p></div>
<div class="para"><p>All the <em>git-commit</em> hooks are invoked with the environment
variable <tt>GIT_EDITOR=:</tt> if the command will not bring up an editor
to modify the commit message.</p></div>
-</div>
-<h2 id="_prepare_commit_msg">prepare-commit-msg</h2>
-<div class="sectionbody">
+<h3 id="_prepare_commit_msg">prepare-commit-msg</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-commit</em> right after preparing the
default log message, and before the editor is started.</p></div>
<div class="para"><p>It takes one to three parameters. The first is the name of the file
@@ -406,9 +399,7 @@ means a failure of the hook and aborts the commit. It should not
be used as replacement for pre-commit hook.</p></div>
<div class="para"><p>The sample <tt>prepare-commit-msg</tt> hook that comes with git comments
out the <tt>Conflicts:</tt> part of a merge's commit message.</p></div>
-</div>
-<h2 id="_commit_msg">commit-msg</h2>
-<div class="sectionbody">
+<h3 id="_commit_msg">commit-msg</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-commit</em>, and can be bypassed
with <tt>--no-verify</tt> option. It takes a single parameter, the
name of the file that holds the proposed commit log message.
@@ -420,21 +411,15 @@ format (if the project has one). It can also be used to refuse
the commit after inspecting the message file.</p></div>
<div class="para"><p>The default <em>commit-msg</em> hook, when enabled, detects duplicate
"Signed-off-by" lines, and aborts the commit if one is found.</p></div>
-</div>
-<h2 id="_post_commit">post-commit</h2>
-<div class="sectionbody">
+<h3 id="_post_commit">post-commit</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-commit</em>. It takes no
parameter, and is invoked after a commit is made.</p></div>
<div class="para"><p>This hook is meant primarily for notification, and cannot affect
the outcome of <em>git-commit</em>.</p></div>
-</div>
-<h2 id="_pre_rebase">pre-rebase</h2>
-<div class="sectionbody">
+<h3 id="_pre_rebase">pre-rebase</h3><div style="clear:left"></div>
<div class="para"><p>This hook is called by <em>git-rebase</em> and can be used to prevent a branch
from getting rebased.</p></div>
-</div>
-<h2 id="_post_checkout">post-checkout</h2>
-<div class="sectionbody">
+<h3 id="_post_checkout">post-checkout</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked when a <em>git-checkout</em> is run after having updated the
worktree. The hook is given three parameters: the ref of the previous HEAD,
the ref of the new HEAD (which may or may not have changed), and a flag
@@ -447,9 +432,7 @@ ref of the new HEAD and the flag is always 1.</p></div>
<div class="para"><p>This hook can be used to perform repository validity checks, auto-display
differences from the previous HEAD if different, or set working dir metadata
properties.</p></div>
-</div>
-<h2 id="_post_merge">post-merge</h2>
-<div class="sectionbody">
+<h3 id="_post_merge">post-merge</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-merge</em>, which happens when a <em>git-pull</em>
is done on a local repository. The hook takes a single parameter, a status
flag specifying whether or not the merge being done was a squash merge.
@@ -459,9 +442,7 @@ if the merge failed due to conflicts.</p></div>
save and restore any form of metadata associated with the working tree
(eg: permissions/ownership, ACLS, etc). See contrib/hooks/setgitperms.perl
for an example of how to do this.</p></div>
-</div>
-<h2 id="pre-receive">pre-receive</h2>
-<div class="sectionbody">
+<h3 id="pre-receive">pre-receive</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-receive-pack</em> on the remote repository,
which happens when a <em>git-push</em> is done on a local repository.
Just before starting to update refs on the remote repository, the
@@ -484,9 +465,7 @@ still be prevented by the <a href="#update"><em>update</em></a> hook.</p></div>
<div class="para"><p>Both standard output and standard error output are forwarded to
<em>git-send-pack</em> on the other end, so you can simply <tt>echo</tt> messages
for the user.</p></div>
-</div>
-<h2 id="update">update</h2>
-<div class="sectionbody">
+<h3 id="update">update</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-receive-pack</em> on the remote repository,
which happens when a <em>git-push</em> is done on a local repository.
Just before updating the ref on the remote repository, the update hook
@@ -531,9 +510,7 @@ for the user.</p></div>
<div class="para"><p>The default <em>update</em> hook, when enabled--and with
<tt>hooks.allowunannotated</tt> config option turned on--prevents
unannotated tags to be pushed.</p></div>
-</div>
-<h2 id="post-receive">post-receive</h2>
-<div class="sectionbody">
+<h3 id="post-receive">post-receive</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-receive-pack</em> on the remote repository,
which happens when a <em>git-push</em> is done on a local repository.
It executes on the remote repository once after all the refs have
@@ -554,9 +531,7 @@ for the user.</p></div>
a sample script <tt>post-receive-email</tt> provided in the <tt>contrib/hooks</tt>
directory in git distribution, which implements sending commit
emails.</p></div>
-</div>
-<h2 id="post-update">post-update</h2>
-<div class="sectionbody">
+<h3 id="post-update">post-update</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-receive-pack</em> on the remote repository,
which happens when a <em>git-push</em> is done on a local repository.
It executes on the remote repository once after all the refs have
@@ -580,8 +555,54 @@ probably enable this hook.</p></div>
<em>git-send-pack</em> on the other end, so you can simply <tt>echo</tt> messages
for the user.</p></div>
</div>
-<h2 id="_pre_auto_gc">pre-auto-gc</h2>
+<h2 id="_post_upload_pack">post-upload-pack</h2>
<div class="sectionbody">
+<div class="para"><p>After upload-pack successfully finishes its operation, this hook is called
+for logging purposes.</p></div>
+<div class="para"><p>The hook is passed various pieces of information, one per line, from its
+standard input. Currently the following items can be fed to the hook, but
+more types of information may be added in the future:</p></div>
+<div class="vlist"><dl>
+<dt>
+want SHA-1
+</dt>
+<dd>
+<p>
+ 40-byte hexadecimal object name the client asked to include in the
+ resulting pack. Can occur one or more times in the input.
+</p>
+</dd>
+<dt>
+have SHA-1
+</dt>
+<dd>
+<p>
+ 40-byte hexadecimal object name the client asked to exclude from
+ the resulting pack, claiming to have them already. Can occur zero
+ or more times in the input.
+</p>
+</dd>
+<dt>
+time float
+</dt>
+<dd>
+<p>
+ Number of seconds spent for creating the packfile.
+</p>
+</dd>
+<dt>
+size decimal
+</dt>
+<dd>
+<p>
+ Size of the resulting packfile in bytes.
+</p>
+</dd>
+</dl></div>
+<div class="para"><p>kind string:
+ Either "clone" (when the client did not give us any "have", and asked
+ for all our refs with "want"), or "fetch" (otherwise).</p></div>
+<h3 id="_pre_auto_gc">pre-auto-gc</h3><div style="clear:left"></div>
<div class="para"><p>This hook is invoked by <em>git-gc --auto</em>. It takes no parameter, and
exiting with non-zero status from this script causes the <em>git-gc --auto</em>
to abort.</p></div>
@@ -592,7 +613,7 @@ to abort.</p></div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 2009-07-01 02:31:08 UTC
+Last updated 2009-09-08 00:55:01 UTC
</div>
</div>
</body>