git-commit: Pass commit SHA-1 hash to post-commit hook.
PATCH 1/1 git-commit: Pass commit SHA-1 hash to post-commit hook.
Signed-off-by David Symonds <[email protected]>
--- Documentation/hooks.txt | 4 ++-- git-commit.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
Documentation/hooks.txt +2 -2
@@ -81,8 +81,8 @@ The default 'commit-msg' hook, when enabled, detects duplicate post-commit ----------- -This hook is invoked by `git-commit`. It takes no -parameter, and is invoked after a commit is made. +This hook is invoked by `git-commit`. It is passed one +parameter (the new commit's SHA-1 hash), and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of `git-commit`.
git-commit.sh +1 -1
@@ -616,7 +616,7 @@ then git gc --auto if test -x "$GIT_DIR"/hooks/post-commit then - "$GIT_DIR"/hooks/post-commit + "$GIT_DIR"/hooks/post-commit $commit fi if test -z "$quiet" then
Signature · 1 line
1.5.3.1