diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-06 21:18:30 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-06 21:18:30 +0300 |
commit | c07b944b9a0535f079ac14cfa849e1f099d38ed8 (patch) | |
tree | c43f4f84a47d6c9fff165cada2c860eb83d73790 /install_dev_githooks.sh | |
parent | 9035c698e9b8067ac612efd9d813a1ee98939d5f (diff) |
Make dev githooks append, not replace.
Diffstat (limited to 'install_dev_githooks.sh')
-rw-r--r-- | install_dev_githooks.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/install_dev_githooks.sh b/install_dev_githooks.sh index ed417821..95c43f25 100644 --- a/install_dev_githooks.sh +++ b/install_dev_githooks.sh @@ -1,8 +1,8 @@ #!/bin/sh echo Installing post-receive hook which recursively forces all echo submodules to latest commit after every git pull -cat <<EOT > .git/hooks/post-receive - #!/bin/sh +cat <<EOT >> .git/hooks/post-receive +#!/bin/sh git submodule foreach --recursive 'branch=\$(git config -f \$toplevel/.gitmodules submodule.\$name.branch); [ \"\$branch\" = \"\" ] && branch=master; git checkout \$branch; git merge FETCH_HEAD' EOT chmod +x .git/hooks/post-receive |