mirror of
https://github.com/git/git.git
synced 2024-09-30 18:22:42 +02:00
b1bf95bba2
Just before updating a ref, $GIT_DIR/hooks/update refname old-sha1 new-sha1 is called if executable. The hook can decline the ref to be updated by exiting with a non-zero status, or allow it to be updated by exiting with a zero status. The mechanism also allows e.g sending of a mail with pushed commits on the remote repository. Documentation update with an example hook is included. jc: The credits of the basic idea and initial implementation go to Josef, but I ended up rewriting major parts of his patch, so bugs are all mine. Also I changed the semantics for the hook from his original version (which were post-update hook) so that the hook can optionally decline to update the ref, and also can be used to implement the overall cleanups. The latter was primarily to implement a suggestion from Linus that calling update-server-info should be made optional. Signed-off-by: Junio C Hamano <junkio@cox.net> |
||
---|---|---|
.. | ||
cvs-migration.txt | ||
diff-format.txt | ||
diff-options.txt | ||
diffcore.txt | ||
git-apply-patch-script.txt | ||
git-apply.txt | ||
git-cat-file.txt | ||
git-check-files.txt | ||
git-checkout-cache.txt | ||
git-clone-pack.txt | ||
git-clone-script.txt | ||
git-commit-tree.txt | ||
git-convert-cache.txt | ||
git-cvsimport-script.txt | ||
git-diff-cache.txt | ||
git-diff-files.txt | ||
git-diff-helper.txt | ||
git-diff-stages.txt | ||
git-diff-tree.txt | ||
git-export.txt | ||
git-fetch-pack.txt | ||
git-fetch-script.txt | ||
git-fsck-cache.txt | ||
git-hash-object.txt | ||
git-http-pull.txt | ||
git-init-db.txt | ||
git-local-pull.txt | ||
git-ls-files.txt | ||
git-ls-tree.txt | ||
git-merge-base.txt | ||
git-merge-cache.txt | ||
git-merge-one-file-script.txt | ||
git-mktag.txt | ||
git-pack-objects.txt | ||
git-peek-remote.txt | ||
git-prune-script.txt | ||
git-pull-script.txt | ||
git-read-tree.txt | ||
git-receive-pack.txt | ||
git-rename-script.txt | ||
git-resolve-script.txt | ||
git-rev-list.txt | ||
git-rev-tree.txt | ||
git-send-pack.txt | ||
git-show-index.txt | ||
git-ssh-pull.txt | ||
git-ssh-push.txt | ||
git-tag-script.txt | ||
git-tar-tree.txt | ||
git-unpack-file.txt | ||
git-unpack-objects.txt | ||
git-update-cache.txt | ||
git-update-server-info.txt | ||
git-upload-pack.txt | ||
git-var.txt | ||
git-verify-pack.txt | ||
git-write-tree.txt | ||
git.txt | ||
Makefile | ||
pack-protocol.txt | ||
pull-fetch-param.txt | ||
tutorial.txt |