summaryrefslogtreecommitdiff
path: root/template/hooks
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-25 23:23:40 -0700
committerMichael Forney <mforney@mforney.org>2016-06-25 23:23:40 -0700
commite1f73d7e9471e9d0e0b911a741346c51c9da6a99 (patch)
tree78d51d4521f1771aab076a32dc613873c3f96a7e /template/hooks
parent5b3e6a38a13d4a7b611cf6ea89c334f95ec8da43 (diff)
post-checkout: Do a full permissions fix in certain cases
Diffstat (limited to 'template/hooks')
-rwxr-xr-xtemplate/hooks/post-checkout5
1 files changed, 4 insertions, 1 deletions
diff --git a/template/hooks/post-checkout b/template/hooks/post-checkout
index c7ab2433..0b04ea29 100755
--- a/template/hooks/post-checkout
+++ b/template/hooks/post-checkout
@@ -2,8 +2,11 @@
old=$1
new=$2
+flag=$3
-if [ "$old" = 0000000000000000000000000000000000000000 ] ; then
+# If HEAD didn't change or if this is just a file checkout, do a complete
+# permissions fix.
+elif [ "$old" = 0000000000000000000000000000000000000000 ] || [ "$old" = "$new" ] || [ "$flag" = 0 ] ; then
set "$new"
else
set "$old" "$new"