Modification : etc/nsd/zone.d/velocampus.net.zone.m4 -->
[lhc/ateliers.git] / local / git-configure
1 #!/bin/sh -eu
2 tool=$(readlink -e "${0%/*}/..")
3 . "$tool"/local/lib.sh
4
5 cd "$tool"
6 git config --replace branch.master.remote .
7 git config --replace branch.master.merge refs/remotes/master
8 install -m 770 /dev/stdin \
9 .git/hooks/post-update <<-EOF
10 #!/bin/sh -efux
11 case \$1 in
12 (refs/remotes/master)
13 cd ..
14 git --git-dir=\$PWD/.git checkout -f -B master remotes/master
15 git --git-dir=\$PWD/.git clean -f -d -x
16 ;;
17 esac
18 EOF