Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-06-06 14:23:33 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2016-06-06 15:03:50 +0300
commit9035c698e9b8067ac612efd9d813a1ee98939d5f (patch)
tree8c999bc17f3e1b42c02615ac9d0c538dd8590ce3 /install_dev_githooks.sh
parent0f5523a492e61a7946a76b6cb4b3738c16773c3a (diff)
Ensure submodules are recursively updated on pull
Diffstat (limited to 'install_dev_githooks.sh')
-rw-r--r--install_dev_githooks.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/install_dev_githooks.sh b/install_dev_githooks.sh
new file mode 100644
index 00000000..ed417821
--- /dev/null
+++ b/install_dev_githooks.sh
@@ -0,0 +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
+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