Autogenerated HTML docs for v1.2.4-gc1504
authorJunio C Hamano <junio@hera.kernel.org>
Sun, 26 Mar 2006 01:49:30 +0000 (01:49 +0000)
committerJunio C Hamano <junio@hera.kernel.org>
Sun, 26 Mar 2006 01:49:30 +0000 (01:49 +0000)
git.html
git.txt
hooks.html
hooks.txt
repository-layout.html
repository-layout.txt

index f8cb445..0570947 100644 (file)
--- a/git.html
+++ b/git.html
@@ -1372,20 +1372,12 @@ HEAD
         (i.e. the contents of <tt>$GIT_DIR/refs/heads/&lt;head&gt;</tt>).\r
 </p>\r
 </dd>\r
-<dt>\r
-&lt;snap&gt;\r
-</dt>\r
-<dd>\r
-<p>\r
-        a valid snapshot <em>name</em>\r
-        (i.e. the contents of <tt>$GIT_DIR/refs/snap/&lt;snap&gt;</tt>).\r
-</p>\r
-</dd>\r
 </dl>\r
 </div>\r
 <h2>File/Directory Structure</h2>\r
 <div class="sectionbody">\r
 <p>Please see <a href="repository-layout.html">repository layout</a> document.</p>\r
+<p>Read <a href="hooks.html">hooks</a> for more details about each hook.</p>\r
 <p>Higher level SCMs may provide and manage additional information in the\r
 <tt>$GIT_DIR</tt>.</p>\r
 </div>\r
@@ -2040,7 +2032,7 @@ contributors on the git-list &lt;git@vger.kernel.org&gt;.</p>
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 18-Mar-2006 07:45:36 UTC\r
+Last updated 26-Mar-2006 01:49:00 UTC\r
 </div>\r
 </div>\r
 </body>\r
diff --git a/git.txt b/git.txt
index de3934d..fe34f50 100644 (file)
--- a/git.txt
+++ b/git.txt
@@ -521,16 +521,14 @@ HEAD::
        a valid head 'name'
        (i.e. the contents of `$GIT_DIR/refs/heads/<head>`).
 
-<snap>::
-       a valid snapshot 'name'
-       (i.e. the contents of `$GIT_DIR/refs/snap/<snap>`).
-
 
 File/Directory Structure
 ------------------------
 
 Please see link:repository-layout.html[repository layout] document.
 
+Read link:hooks.html[hooks] for more details about each hook.
+
 Higher level SCMs may provide and manage additional information in the
 `$GIT_DIR`.
 
index fb64b28..626703f 100644 (file)
@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.1" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
 <style type="text/css">\r
 /* Debug borders */\r
 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
@@ -342,16 +342,27 @@ send out a commit notification e-mail.</p>
 </div>\r
 <h2>update</h2>\r
 <div class="sectionbody">\r
-<p>This hook is invoked by <tt>git-receive-pack</tt>, which is invoked\r
-when a <tt>git push</tt> is done against the repository.  It takes\r
-three parameters, name of the ref being updated, old object name\r
-stored in the ref, and the new objectname to be stored in the\r
-ref.  Exiting with non-zero status from this hook prevents\r
-<tt>git-receive-pack</tt> from updating the ref.</p>\r
-<p>This can be used to prevent <em>forced</em> update on certain refs by\r
+<p>This hook is invoked by <tt>git-receive-pack</tt> on the remote repository,\r
+which is happens when a <tt>git push</tt> is done on a local repository.\r
+Just before updating the ref on the remote repository, the update hook\r
+is invoked.  It's exit status determins the success or failure of\r
+the ref update.</p>\r
+<p>The hook executes once for each ref to be updated, and takes\r
+three parameters:\r
+    - the name of the ref being updated,\r
+    - the old object name stored in the ref,\r
+    - and the new objectname to be stored in the ref.</p>\r
+<p>A zero exit from the update hook allows the ref to be updated.\r
+Exiting with a non-zero status prevents <tt>git-receive-pack</tt>\r
+from updating the ref.</p>\r
+<p>This hook can be used to prevent <em>forced</em> update on certain refs by\r
 making sure that the object name is a commit object that is a\r
 descendant of the commit object named by the old object name.\r
-Another use suggested on the mailing list is to use this hook to\r
+That is, to enforce a "fast forward only" policy.</p>\r
+<p>It could also be used to log the old..new status.  However, it\r
+does not know the entire set of branches, so it would end up\r
+firing one e-mail per ref when used naively, though.</p>\r
+<p>Another use suggested on the mailing list is to use this hook to\r
 implement access control which is finer grained than the one\r
 based on filesystem group.</p>\r
 <p>The standard output of this hook is sent to /dev/null; if you\r
@@ -360,22 +371,29 @@ you can redirect your output to your stderr.</p>
 </div>\r
 <h2>post-update</h2>\r
 <div class="sectionbody">\r
-<p>This hook is invoked by <tt>git-receive-pack</tt>, which is invoked\r
-when a <tt>git push</tt> is done against the repository.  It takes\r
-variable number of parameters; each of which is the name of ref\r
-that was actually updated.</p>\r
+<p>This hook is invoked by <tt>git-receive-pack</tt> on the remote repository,\r
+which is happens when a <tt>git push</tt> is done on a local repository.\r
+It executes on the remote repository once after all the refs have\r
+been updated.</p>\r
+<p>It takes a variable number of parameters, each of which is the\r
+name of ref that was actually updated.</p>\r
 <p>This hook is meant primarily for notification, and cannot affect\r
 the outcome of <tt>git-receive-pack</tt>.</p>\r
+<p>The post-update hook can tell what are the heads that were pushed,\r
+but it does not know what their original and updated values are,\r
+so it is a poor place to do log old..new.</p>\r
 <p>The default post-update hook, when enabled, runs\r
 <tt>git-update-server-info</tt> to keep the information used by dumb\r
-transport up-to-date.</p>\r
+transports (eg, http) up-to-date.  If you are publishing\r
+a git repository that is accessible via http, you should\r
+probably enable this hook.</p>\r
 <p>The standard output of this hook is sent to /dev/null; if you\r
 want to report something to the git-send-pack on the other end,\r
 you can redirect your output to your stderr.</p>\r
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 27-Dec-2005 00:17:09 PDT\r
+Last updated 26-Mar-2006 01:49:03 UTC\r
 </div>\r
 </div>\r
 </body>\r
index 4ad1920..3824a95 100644 (file)
--- a/hooks.txt
+++ b/hooks.txt
@@ -97,16 +97,31 @@ send out a commit notification e-mail.
 update
 ------
 
-This hook is invoked by `git-receive-pack`, which is invoked
-when a `git push` is done against the repository.  It takes
-three parameters, name of the ref being updated, old object name
-stored in the ref, and the new objectname to be stored in the
-ref.  Exiting with non-zero status from this hook prevents
-`git-receive-pack` from updating the ref.
-
-This can be used to prevent 'forced' update on certain refs by
+This hook is invoked by `git-receive-pack` on the remote repository,
+which is happens when a `git push` is done on a local repository.
+Just before updating the ref on the remote repository, the update hook
+is invoked.  It's exit status determins the success or failure of
+the ref update.
+
+The hook executes once for each ref to be updated, and takes
+three parameters:
+    - the name of the ref being updated,
+    - the old object name stored in the ref,
+    - and the new objectname to be stored in the ref.
+
+A zero exit from the update hook allows the ref to be updated.
+Exiting with a non-zero status prevents `git-receive-pack`
+from updating the ref.
+
+This hook can be used to prevent 'forced' update on certain refs by
 making sure that the object name is a commit object that is a
 descendant of the commit object named by the old object name.
+That is, to enforce a "fast forward only" policy.
+
+It could also be used to log the old..new status.  However, it
+does not know the entire set of branches, so it would end up
+firing one e-mail per ref when used naively, though.
+
 Another use suggested on the mailing list is to use this hook to
 implement access control which is finer grained than the one
 based on filesystem group.
@@ -115,20 +130,30 @@ The standard output of this hook is sent to /dev/null; if you
 want to report something to the git-send-pack on the other end,
 you can redirect your output to your stderr.
 
+
 post-update
 -----------
 
-This hook is invoked by `git-receive-pack`, which is invoked
-when a `git push` is done against the repository.  It takes
-variable number of parameters; each of which is the name of ref
-that was actually updated.
+This hook is invoked by `git-receive-pack` on the remote repository,
+which is happens when a `git push` is done on a local repository.
+It executes on the remote repository once after all the refs have
+been updated.
+
+It takes a variable number of parameters, each of which is the
+name of ref that was actually updated.
 
 This hook is meant primarily for notification, and cannot affect
 the outcome of `git-receive-pack`.
 
+The post-update hook can tell what are the heads that were pushed,
+but it does not know what their original and updated values are,
+so it is a poor place to do log old..new.
+
 The default post-update hook, when enabled, runs
 `git-update-server-info` to keep the information used by dumb
-transport up-to-date.
+transports (eg, http) up-to-date.  If you are publishing
+a git repository that is accessible via http, you should
+probably enable this hook.
 
 The standard output of this hook is sent to /dev/null; if you
 want to report something to the git-send-pack on the other end,
index 3ef3215..91ce846 100644 (file)
@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\r
 <head>\r
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
-<meta name="generator" content="AsciiDoc 7.0.1" />\r
+<meta name="generator" content="AsciiDoc 7.0.2" />\r
 <style type="text/css">\r
 /* Debug borders */\r
 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {\r
@@ -419,6 +419,8 @@ hooks
         commands.  A handful of sample hooks are installed when\r
         <tt>git init-db</tt> is run, but all of them are disabled by\r
         default.  To enable, they need to be made executable.\r
+        Read <a href="hooks.html">hooks</a> for more details about\r
+        each hook.\r
 </p>\r
 </dd>\r
 <dt>\r
@@ -493,7 +495,7 @@ remotes
 </div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 25-Jan-2006 04:37:17 PDT\r
+Last updated 26-Mar-2006 01:49:02 UTC\r
 </div>\r
 </div>\r
 </body>\r
index 1f19bf8..98fbe7d 100644 (file)
@@ -89,6 +89,8 @@ hooks::
        commands.  A handful of sample hooks are installed when
        `git init-db` is run, but all of them are disabled by
        default.  To enable, they need to be made executable.
+       Read link:hooks.html[hooks] for more details about
+       each hook.
 
 index::
        The current index file for the repository.  It is