Skip to content

Commit

Permalink
Merge pull request #12088 from dt/hooks
Browse files Browse the repository at this point in the history
githooks: just update submodule on ref changes
  • Loading branch information
dt authored Dec 6, 2016
2 parents 2953392 + 3f06d9b commit b4de2e6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions githooks/post-checkout
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -e

[[ ! $GIT_REFLOG_ACTION =~ pull[[:space:]]+--rebase ]] && exit 0

make .bootstrap
if [ "$1" != "$2" ]; then # previous ref != new ref.
exec git submodule update --init
fi
4 changes: 1 addition & 3 deletions githooks/post-merge
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
set -e

[[ ! $GIT_REFLOG_ACTION =~ pull ]] && exit 0

make .bootstrap
exec git submodule update --init
4 changes: 1 addition & 3 deletions githooks/post-rewrite
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#!/usr/bin/env bash
set -e

[[ ! $GIT_REFLOG_ACTION =~ rebase ]] && exit 0

make .bootstrap
# TODO(dt): do we want to submomdule update here?

0 comments on commit b4de2e6

Please sign in to comment.