[PATCH] Add post-merge hook.
From: <hidden>
Date: 2016-06-15 22:43:31
Subsystem:
documentation, the rest · Maintainers:
Jonathan Corbet, Linus Torvalds
From: Josh England <redacted> This adds a post-merge hook that will run after `git pull` operations if enabled. The hook is passed no arguments and cannot affect the outcome of a merge. Signed-off-by: Josh England <redacted> --- Documentation/hooks.txt | 8 ++++++++ git-merge.sh | 6 ++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt
index c39edc5..841b37f 100644
--- a/Documentation/hooks.txt
+++ b/Documentation/hooks.txt@@ -87,6 +87,14 @@ parameter, and is invoked after a commit is made. This hook is meant primarily for notification, and cannot affect the outcome of `git-commit`. +post-merge +----------- + +This hook is invoked by `git-merge`, which happens when a `git pull` +is done on a local repository. + +The hook takes no parameters, and cannot affect the outcome of `git-merge`. + [[pre-receive]] pre-receive -----------
diff --git a/git-merge.sh b/git-merge.sh
index 3a01db0..0a77bfb 100755
--- a/git-merge.sh
+++ b/git-merge.sh@@ -97,6 +97,12 @@ finish () { fi ;; esac + + # Run a post-merge hook + if test -x "$GIT_DIR"/hooks/post-merge + then + "$GIT_DIR"/hooks/post-merge + fi } merge_name () {
--
1.5.3.rc7-dirty