diff options
author | Sitaram Chamarty <sitaramc@gmail.com> | 2018-09-21 09:10:39 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaramc@gmail.com> | 2018-09-21 09:10:39 +0530 |
commit | 30f49dc5550f9b551eee374f547997c73af0c99b (patch) | |
tree | 9db0435c662ea411c0f3f5338fca1bd290180421 | |
parent | v3.6.9 (diff) | |
download | gitolite-gentoo-30f49dc5550f9b551eee374f547997c73af0c99b.tar.gz gitolite-gentoo-30f49dc5550f9b551eee374f547997c73af0c99b.tar.bz2 gitolite-gentoo-30f49dc5550f9b551eee374f547997c73af0c99b.zip |
block access() to repos being imported
dc13dfc introduced a block on accessing repos which are in the process
of being moved into gitolite's control.
This block was (a) in gitolite-shell, which would catch all git-client
activity and (b) in list_phy_repos(), which would prevent those repos
from being seen by the 'info' command.
Unfortunately that was stupid; it also blocked 'gitolite setup' itself,
because setup uses list_phy_repos!
The correct place to put this was always going to be access(), but I had
initially shied away from that because it would cause a slight glitch in
the working of any POST_COMPILE trigger scripts that used the access()
function on any of the newly migrated repos.
But nothing else really works. As a result, the step where you run
`gitolite setup` when importing now becomes:
gitolite compile
gitolite setup --hooks-only
gitolite trigger POST_COMPILE
-rwxr-xr-x | src/gitolite-shell | 7 | ||||
-rw-r--r-- | src/lib/Gitolite/Common.pm | 2 | ||||
-rw-r--r-- | src/lib/Gitolite/Conf/Load.pm | 1 |
3 files changed, 1 insertions, 9 deletions
diff --git a/src/gitolite-shell b/src/gitolite-shell index 6c4c462..072e0ff 100755 --- a/src/gitolite-shell +++ b/src/gitolite-shell @@ -113,13 +113,6 @@ sub main { $ENV{GL_REPO} = $repo; my $aa = ( $verb =~ 'upload' ? 'R' : 'W' ); - # catch rare race when moving repos into gitolite control - _die "$aa any $repo $user DENIED by fallthru" . - "\n(or you mis-spelled the reponame)" - unless update_hook_present($repo); - # this error message is exactly the same as that from elsewhere in the - # code, for the usual reasons (avoid leaking information) - # set up env vars from options set for this repo env_options($repo); diff --git a/src/lib/Gitolite/Common.pm b/src/lib/Gitolite/Common.pm index 3f47b37..af9c875 100644 --- a/src/lib/Gitolite/Common.pm +++ b/src/lib/Gitolite/Common.pm @@ -239,8 +239,6 @@ sub cleanup_conf_line { $repo =~ s(^\./)(); next if $repo =~ m(/$); # tolerate non-bare repos within ~/repositories but silently ignore them - next unless update_hook_present($repo); - # ignore repos that don't yet have the update hook push @phy_repos, $repo; } trace( 3, scalar(@phy_repos) . " physical repos found" ); diff --git a/src/lib/Gitolite/Conf/Load.pm b/src/lib/Gitolite/Conf/Load.pm index e0e4e92..d377bca 100644 --- a/src/lib/Gitolite/Conf/Load.pm +++ b/src/lib/Gitolite/Conf/Load.pm @@ -73,6 +73,7 @@ sub access { trace( 2, $repo, $user, $aa, $ref ); _die "invalid user '$user'" if not( $user and $user =~ $USERNAME_PATT ); sanity($repo); + return "$aa any $repo $user DENIED by fallthru" unless update_hook_present($repo); my @rules; my $deny_rules; |