X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=vm_hosted;h=3649341fb152459388d71b57154a3c6ba5e89294;hp=3247eb59608d4005f67d00882d818b13f057c181;hb=82f0ba3e09ca73635984d0592bc44fef88b391c3;hpb=15544277d6904aab26cd5fd0b4c410dafd2b3887 diff --git a/vm_hosted b/vm_hosted index 3247eb5..3649341 100755 --- a/vm_hosted +++ b/vm_hosted @@ -35,6 +35,16 @@ rule_git_configure () { tool=$(cd "$tool"; cd -) sudo ln -fns "$tool"/vm_hosted /usr/local/sbin/ sudo ln -fns "$tool"/vm_hosted /usr/local/sbin/vm + sudo install -m 770 /dev/stdin .git/hooks/post-update <<-EOF + #!/bin/sh -efux + case \$1 in + (refs/remotes/master) + cd .. + git --git-dir=\$PWD/.git checkout -f -B master remotes/master + git --git-dir=\$PWD/.git clean -f -d - + ;; + esac + EOF ) } rule_git_reset () {