bugfix: don't delete description file when running perms

thanks to drue on #gitolite for catching it
This commit is contained in:
Sitaram Chamarty 2012-12-05 05:54:38 +05:30
parent 2741fadc9d
commit f1c69a3ec0

View file

@ -6,8 +6,10 @@
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# delete the 'description' file that 'git init' created if this is run from # delete the 'description' file that 'git init' created if this is run from
# the post-create trigger # the post-create trigger. However, note that POST_CREATE is also called from
[ "$1" = "POST_CREATE" ] && rm -f $GL_REPO_BASE/$2.git/description 2>/dev/null # perms (since POST_CREATE doubles as eqvt of POST_COMPILE to propagate ad hoc
# permissions changes for wild repos) and then you should not delete it.
[ "$1" = "POST_CREATE" ] && [ "$4" != "perms" ] && rm -f $GL_REPO_BASE/$2.git/description 2>/dev/null
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
# skip if arg-1 is POST_CREATE and no arg-3 (user name) exists; this means # skip if arg-1 is POST_CREATE and no arg-3 (user name) exists; this means