aboutsummaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-09-07 15:24:47 -0700
committerJunio C Hamano <gitster@pobox.com>2009-09-07 15:24:47 -0700
commite4d1afbcf2e39a997ae90befd629ee53e444c4c9 (patch)
treecf73286b1455877aa3c09dd059fcc42a61b6a16a /Documentation
parent54f0bdc81103f45f12978b385a9519a235b03cc2 (diff)
parent11cae066b2433fcec807810b45f317f8203df358 (diff)
downloadgit-e4d1afbcf2e39a997ae90befd629ee53e444c4c9.tar.gz
git-e4d1afbcf2e39a997ae90befd629ee53e444c4c9.tar.xz
Merge branch 'jc/upload-pack-hook'
* jc/upload-pack-hook: upload-pack: feed "kind [clone|fetch]" to post-upload-pack hook upload-pack: add a trigger for post-upload-pack hook
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-upload-pack.txt2
-rw-r--r--Documentation/githooks.txt29
2 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt
index b8e49dce4..63f3b5c74 100644
--- a/Documentation/git-upload-pack.txt
+++ b/Documentation/git-upload-pack.txt
@@ -20,6 +20,8 @@ The UI for the protocol is on the 'git-fetch-pack' side, and the
program pair is meant to be used to pull updates from a remote
repository. For push operations, see 'git-send-pack'.
+After finishing the operation successfully, `post-upload-pack`
+hook is called (see linkgit:githooks[5]).
OPTIONS
-------
diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt
index 1c736738c..c308d2943 100644
--- a/Documentation/githooks.txt
+++ b/Documentation/githooks.txt
@@ -307,6 +307,35 @@ Both standard output and standard error output are forwarded to
'git-send-pack' on the other end, so you can simply `echo` messages
for the user.
+post-upload-pack
+----------------
+
+After upload-pack successfully finishes its operation, this hook is called
+for logging purposes.
+
+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:
+
+want SHA-1::
+ 40-byte hexadecimal object name the client asked to include in the
+ resulting pack. Can occur one or more times in the input.
+
+have SHA-1::
+ 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.
+
+time float::
+ Number of seconds spent for creating the packfile.
+
+size decimal::
+ Size of the resulting packfile in bytes.
+
+kind string:
+ Either "clone" (when the client did not give us any "have", and asked
+ for all our refs with "want"), or "fetch" (otherwise).
+
pre-auto-gc
-----------