summaryrefslogtreecommitdiff
path: root/template/hooks/post-checkout
blob: 2a7a1c2a2af7f199cd0ef17aaabdee6a21521a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

old=$1
new=$2
flag=$3

# If HEAD didn't change or if this is just a file checkout, do a complete
# permissions fix.
if [ "$old" = 0000000000000000000000000000000000000000 ] || [ "$old" = "$new" ] || [ "$flag" = 0 ] ; then
	set "$new"
else
	set "$old" "$new"
fi

exec "$(git config oasis.root)"/libexec/applyperms "$@"