summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-09-23 22:51:03 -0700
committerJunio C Hamano <gitster@pobox.com>2007-09-23 22:51:03 -0700
commit91d4b2ee816b565d298ee65fcf11d5aecd2d67dc (patch)
treeecd6d805cbd1b4c5758573ed8b639eba286ab132 /git-merge.sh
parent52d5bc9a161f839b78ec06c25736d09703fda802 (diff)
parentaf6fb4c822a5a65c7671d810127171759dff38f6 (diff)
downloadgit-91d4b2ee816b565d298ee65fcf11d5aecd2d67dc.tar.gz
Merge branch 'je/hooks'
* je/hooks: Added example hook script to save/restore permissions/ownership. Add post-merge hook, related documentation, and tests.
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-merge.sh b/git-merge.sh
index cde09d4d60..6c513dcbdf 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -97,6 +97,19 @@ finish () {
fi
;;
esac
+
+ # Run a post-merge hook
+ if test -x "$GIT_DIR"/hooks/post-merge
+ then
+ case "$squash" in
+ t)
+ "$GIT_DIR"/hooks/post-merge 1
+ ;;
+ '')
+ "$GIT_DIR"/hooks/post-merge 0
+ ;;
+ esac
+ fi
}
merge_name () {