Skip to content
Browse files

Call the hooks explicitly on a per-action basis, with positional

arguments that are relevant for the action at hand.
  • Loading branch information...
1 parent 203a793 commit 359db2059058157ac4456f7688d1f9cb0ec2991a @nvie nvie committed
Showing with 4 additions and 7 deletions.
  1. +0 −7 git-flow
  2. +4 −0 git-flow-feature
View
7 git-flow
@@ -105,15 +105,8 @@ main() {
exit 1
fi
- # Run hook action
- do_hook pre
-
# run the specified action
cmd_$SUBACTION "$@"
-
- # Run hook action
- do_hook post
-
}
main "$@"
View
4 git-flow-feature
@@ -494,6 +494,8 @@ cmd_pull() {
require_clean_working_tree
+ run_pre_hook "$NAME" "$REMOTE" "$BRANCH"
+
if git_branch_exists "$BRANCH"; then
# Again, avoid accidental merges
avoid_accidental_cross_branch_action || die
@@ -509,4 +511,6 @@ cmd_pull() {
git checkout -q "$BRANCH" || die "Checking out new local branch failed."
echo "Created local branch $BRANCH based on $REMOTE's $BRANCH."
fi
+
+ run_post_hook "$NAME" "$REMOTE" "$BRANCH"
}

0 comments on commit 359db20

Please sign in to comment.
Something went wrong with that request. Please try again.