From c25e05d87b630b0472411202165e2c2d5e2bed25 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 30 Jul 2010 05:44:29 +0530 Subject: [PATCH] distinguish "repo not found" from "no access" if the user has rights anyway thanks to Jesse from the Fedora team for pointing this out. They use GL_NO_CREATE_REPOS, so sometimes the physical repo on disk doesn't exist at the time the config file is written. We're talking about non-wild repos only here, so this means it should never happen to normal gitolite users. But now -- in the rare case that there is a disk-side problem -- people who have rights to a repo will get a more specific error message. --- src/gitolite.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gitolite.pm b/src/gitolite.pm index f432074..dbcfcfc 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -437,7 +437,7 @@ sub expand_wild $perm = ( $repos{$repo}{C}{'@all'} ? ' @C' : ( $repos{$repo}{C}{$ENV{GL_USER}} ? ' =C' : ' ' )) if $GL_WILDREPOS; # if you didn't have perms to create it, delete the "convenience" # copy of the ACL that parse_acl makes - delete $repos{$repo} unless $perm =~ /C/; + delete $repos{$repo} if $perm !~ /C/ and $wild; $creator = ""; } $perm .= ( $repos{$repo}{R}{'@all'} ? ' @R' : ( $repos{'@all'}{R}{$ENV{GL_USER}} ? ' #R' : ( $repos{$repo}{R}{$ENV{GL_USER}} ? ' R' : ' ' )));