aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@orbis-terrarum.net>2014-08-23 10:08:16 -0700
committerRobin H. Johnson <robbat2@orbis-terrarum.net>2014-08-23 10:08:16 -0700
commit31f51b7e085ad8142aef238c1ec4acf4ceb12bc7 (patch)
treef6ab2f043bf19d93b7f3017d95d4786ad0bbc5b0
parentDo not assume that the test user is in a group of the same name. (diff)
downloadgitolite-gentoo-31f51b7e085ad8142aef238c1ec4acf4ceb12bc7.tar.gz
gitolite-gentoo-31f51b7e085ad8142aef238c1ec4acf4ceb12bc7.tar.bz2
gitolite-gentoo-31f51b7e085ad8142aef238c1ec4acf4ceb12bc7.zip
Only change umask after wildrepos check.
Signed-off-by: Robin H. Johnson <robbat2@orbis-terrarum.net>
-rw-r--r--src/gitolite.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gitolite.pm b/src/gitolite.pm
index 487f265..bc18418 100644
--- a/src/gitolite.pm
+++ b/src/gitolite.pm
@@ -286,11 +286,12 @@ sub new_repo
{
my ($repo, $hooks_dir, $creator, $umask) = @_;
+ die "wildrepos disabled, can't set creator $creator on new repo $repo\n"
+ if $creator and not $GL_WILDREPOS;
+
my $oldumask = umask();
my $newumask = $umask ? $umask : get_repo_umask($repo);
umask($newumask);
- die "wildrepos disabled, can't set creator $creator on new repo $repo\n"
- if $creator and not $GL_WILDREPOS;
system("mkdir", "-p", "$repo.git") and die "$ABRT mkdir $repo.git failed: $!\n";
# erm, note that's "and die" not "or die" as is normal in perl