diff options
author | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-12-05 05:54:38 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-12-05 06:00:00 +0530 |
commit | f1c69a3ec0bea287103232d2b2298c7ed51f336f (patch) | |
tree | 2fa09767971eab5bac43960183d0cbb33a694716 | |
parent | a few minor changes (diff) | |
download | gitolite-gentoo-f1c69a3ec0bea287103232d2b2298c7ed51f336f.tar.gz gitolite-gentoo-f1c69a3ec0bea287103232d2b2298c7ed51f336f.tar.bz2 gitolite-gentoo-f1c69a3ec0bea287103232d2b2298c7ed51f336f.zip |
bugfix: don't delete description file when running perms
thanks to drue on #gitolite for catching it
-rwxr-xr-x | src/triggers/post-compile/update-gitweb-access-list | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/triggers/post-compile/update-gitweb-access-list b/src/triggers/post-compile/update-gitweb-access-list index d986fb3..11e1aa6 100755 --- a/src/triggers/post-compile/update-gitweb-access-list +++ b/src/triggers/post-compile/update-gitweb-access-list @@ -6,8 +6,10 @@ # ---------------------------------------------------------------------- # delete the 'description' file that 'git init' created if this is run from -# the post-create trigger -[ "$1" = "POST_CREATE" ] && rm -f $GL_REPO_BASE/$2.git/description 2>/dev/null +# the post-create trigger. However, note that POST_CREATE is also called from +# 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 |