From 8638c92248aa3a950fe0a206e702f5c35d69fa35 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sat, 12 May 2007 20:50:08 +0000 Subject: [PATCH] Autogenerated HTML docs for v1.5.2-rc3-14-g6671 --- RelNotes-1.5.2.txt | 16 +++++----- git-clone.html | 4 +-- git-clone.txt | 2 +- hooks.html | 69 +++++++++++++++++++++++++++++++++++------ hooks.txt | 77 +++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 141 insertions(+), 27 deletions(-) diff --git a/RelNotes-1.5.2.txt b/RelNotes-1.5.2.txt index 42e7fa5be..d1c2cac4f 100644 --- a/RelNotes-1.5.2.txt +++ b/RelNotes-1.5.2.txt @@ -40,7 +40,7 @@ Updates since v1.5.1 This release supports the "version 2" format of the .idx file. This is automatically enabled when a huge packfile needs more than 32-bit to express offsets of objects in the - pack + pack. * Comes with an updated git-gui 0.7.0 @@ -114,7 +114,7 @@ Updates since v1.5.1 - Local "git fetch" from a repository whose object store is one of the alternates (e.g. fetching from the origin in a repository created with "git clone -l -s") avoids - downloading objects unnecessary. + downloading objects unnecessarily. - "git blame" uses .mailmap to canonicalize the author name just like "git shortlog" does. @@ -124,7 +124,7 @@ Updates since v1.5.1 - "git cherry-pick" and "git revert" does not use .msg file in the working tree to prepare commit message; instead it uses - $GIT_DIR/MERGE_MSG as other commands. + $GIT_DIR/MERGE_MSG as other commands do. * Builds @@ -134,7 +134,7 @@ Updates since v1.5.1 - gitk and git-gui can be configured out. - Generated documentation pages automatically get version - information from GIT_VERSION + information from GIT_VERSION. - Parallel build with "make -j" descending into subdirectory was fixed. @@ -151,11 +151,13 @@ Updates since v1.5.1 - The recursive merge strategy updated a worktree file that was changed identically in two branches, when one of them renamed it. We do not do that when there is no rename, so - match that behaviour. + match that behaviour. This avoids excessive rebuilds. - The default pack depth has been increased to 50, as the recent addition of delta_base_cache makes deeper delta chains - much less expensive to access. + much less expensive to access. Depending on the project, it was + reported that this reduces the resulting pack file by 10% + or so. Fixes since v1.5.1 @@ -194,6 +196,6 @@ this release, unless otherwise noted. -- exec >/var/tmp/1 -O=v1.5.2-rc2-91-g616e40b +O=v1.5.2-rc3 echo O=`git describe refs/heads/master` git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint diff --git a/git-clone.html b/git-clone.html index e11a31620..6d6882bbb 100644 --- a/git-clone.html +++ b/git-clone.html @@ -470,7 +470,7 @@ Make a local clone that borrows from the current directory, without checking thi
$ git clone -l -s -n . ../copy
-$ cd copy
+$ cd ../copy
 $ git show-branch
@@ -521,7 +521,7 @@ Create a repository on the kernel.org machine that borrows from Linus diff --git a/git-clone.txt b/git-clone.txt index 6d32c491a..644bf126f 100644 --- a/git-clone.txt +++ b/git-clone.txt @@ -132,7 +132,7 @@ Make a local clone that borrows from the current directory, without checking thi + ------------ $ git clone -l -s -n . ../copy -$ cd copy +$ cd ../copy $ git show-branch ------------ diff --git a/hooks.html b/hooks.html index 85d26b229..9a6616dff 100644 --- a/hooks.html +++ b/hooks.html @@ -337,7 +337,31 @@ parameter, and is invoked after a commit is made.

This hook is meant primarily for notification, and cannot affect the outcome of git-commit.

-

update

+

pre-receive

+
+

This hook is invoked by git-receive-pack on the remote repository, +which happens when a git push is done on a local repository. +Just before starting to update refs on the remote repository, the +pre-receive hook is invoked. Its exit status determines the success +or failure of the update.

+

This hook executes once for the receive operation. It takes no +arguments, but for each ref to be updated it receives on standard +input a line of the format:

+
+
+
<old-value> SP <new-value> SP <ref-name> LF
+
+

where <old-value> is the old object name stored in the ref, +<new-value> is the new object name to be stored in the ref and +<ref-name> is the full name of the ref. +When creating a new ref, <old-value> is 40 0.

+

If the hook exits with non-zero status, none of the refs will be +updated. If the hook exits with zero, updating of individual refs can +still be prevented by the update hook.

+

If you want to report something to the git-send-pack on the other end, +you can simply echo your messages.

+
+

update

This hook is invoked by git-receive-pack on the remote repository, which happens when a git push is done on a local repository. @@ -365,24 +389,46 @@ 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.

+from updating that 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.

+firing one e-mail per ref when used naively, though. The +post-receive hook is more suited to that.

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.

The standard output of this hook is sent to stderr, so if you want to report something to the git-send-pack on the other end, you can simply echo your messages.

-

The default update hook, when enabled, demonstrates how to -send out a notification e-mail.

+

The default update hook, when enabled—and with +hooks.allowunannotated config option turned on—prevents +unannotated tags to be pushed.

+
+

post-receive

+
+

This hook is invoked by git-receive-pack on the remote repository, +which 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.

+

This hook executes once for the receive operation. It takes no +arguments, but gets the same information as the pre-receive +hook does on its standard input.

+

This hook does not affect the outcome of git-receive-pack, as it +is called after the real work is done.

+

This supersedes the hook in that it actually get's +both old and new values of all the refs.

+

If you want to report something to the git-send-pack on the +other end, you can simply echo your messages.

+

The default post-receive hook is empty, but there is +a sample script post-receive-email provided in the contrib/hooks +directory in git distribution, which implements sending commit +emails.

-

post-update

+

post-update

This hook is invoked by git-receive-pack on the remote repository, which happens when a git push is done on a local repository. @@ -395,18 +441,21 @@ 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.

+

In general, post-receive hook is preferred when the hook needs +to decide its acion on the status of the entire set of refs +being updated, as this hook is called once per ref, with +information only on a single ref at a time.

When enabled, the default post-update hook runs git-update-server-info to keep the information used by dumb transports (e.g., 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, -you can redirect your output to your stderr.

+

Both standard output and standard error output are forwarded to +git-send-pack on the other end.

diff --git a/hooks.txt b/hooks.txt index b083290d1..80ba6709a 100644 --- a/hooks.txt +++ b/hooks.txt @@ -90,6 +90,35 @@ parameter, and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of `git-commit`. +[[pre-receive]] +pre-receive +----------- + +This hook is invoked by `git-receive-pack` on the remote repository, +which happens when a `git push` is done on a local repository. +Just before starting to update refs on the remote repository, the +pre-receive hook is invoked. Its exit status determines the success +or failure of the update. + +This hook executes once for the receive operation. It takes no +arguments, but for each ref to be updated it receives on standard +input a line of the format: + + SP SP LF + +where `` is the old object name stored in the ref, +`` is the new object name to be stored in the ref and +`` is the full name of the ref. +When creating a new ref, `` is 40 `0`. + +If the hook exits with non-zero status, none of the refs will be +updated. If the hook exits with zero, updating of individual refs can +still be prevented by the <> hook. + +If you want to report something to the `git-send-pack` on the other end, +you can simply `echo` your messages. + +[[update]] update ------ @@ -108,7 +137,7 @@ three parameters: 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. +from updating that 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 @@ -117,7 +146,8 @@ 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. +firing one e-mail per ref when used naively, though. The +<> hook is more suited to that. Another use suggested on the mailing list is to use this hook to implement access control which is finer grained than the one @@ -127,9 +157,38 @@ The standard output of this hook is sent to `stderr`, so if you want to report something to the `git-send-pack` on the other end, you can simply `echo` your messages. -The default 'update' hook, when enabled, demonstrates how to -send out a notification e-mail. +The default 'update' hook, when enabled--and with +`hooks.allowunannotated` config option turned on--prevents +unannotated tags to be pushed. + +[[post-receive]] +post-receive +------------ +This hook is invoked by `git-receive-pack` on the remote repository, +which 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. + +This hook executes once for the receive operation. It takes no +arguments, but gets the same information as the `pre-receive` +hook does on its standard input. + +This hook does not affect the outcome of `git-receive-pack`, as it +is called after the real work is done. + +This supersedes the [[post-update]] hook in that it actually get's +both old and new values of all the refs. + +If you want to report something to the `git-send-pack` on the +other end, you can simply `echo` your messages. + +The default 'post-receive' hook is empty, but there is +a sample script `post-receive-email` provided in the `contrib/hooks` +directory in git distribution, which implements sending commit +emails. + +[[post-update]] post-update ----------- @@ -148,12 +207,16 @@ 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. +In general, `post-receive` hook is preferred when the hook needs +to decide its acion on the status of the entire set of refs +being updated, as this hook is called once per ref, with +information only on a single ref at a time. + When enabled, the default 'post-update' hook runs `git-update-server-info` to keep the information used by dumb transports (e.g., 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, -you can redirect your output to your `stderr`. +Both standard output and standard error output are forwarded to +`git-send-pack` on the other end. -- 2.26.2