You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-vcs/gitolite-gentoo/files/gitolite-gentoo-1.5.9.1-uma...

43 lines
1.5 KiB

From cab19e5760b43385347a8960e48a05c547cf54e6 Mon Sep 17 00:00:00 2001
From: Christian Ruppert <idl0r@gentoo.org>
Date: Tue, 1 Mar 2011 23:37:03 +0100
Subject: [PATCH] Set umask properly before initialising a new repo
---
src/gitolite.pm | 4 ++--
src/gl-compile-conf | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/gitolite.pm b/src/gitolite.pm
index 73038ca..d58df32 100644
--- a/src/gitolite.pm
+++ b/src/gitolite.pm
@@ -274,9 +274,9 @@ sub where_is_rc
# NOTE: this sub will change your cwd; caller beware!
sub new_repo
{
- my ($repo, $hooks_dir, $creator) = @_;
+ my ($repo, $hooks_dir, $creator, $umask) = @_;
- umask(get_repo_umask($repo));
+ umask($umask ? $umask : get_repo_umask($repo));
die "wildrepos disabled, can't set creator $creator on new repo $repo\n"
if $creator and not $GL_WILDREPOS;
diff --git a/src/gl-compile-conf b/src/gl-compile-conf
index f8d35bb..e0a5331 100755
--- a/src/gl-compile-conf
+++ b/src/gl-compile-conf
@@ -497,7 +497,7 @@ sub do_normal_repos
unless ($GL_NO_CREATE_REPOS) {
unless (-d "$repo.git") {
print STDERR "creating $repo...\n";
- new_repo($repo, "$GL_ADMINDIR/hooks/common");
+ new_repo($repo, "$GL_ADMINDIR/hooks/common", undef, $repos{$repo}{"umask"});
# new_repo would have chdir'd us away; come back
wrap_chdir("$ENV{GL_REPO_BASE_ABS}");
}
--
1.7.3.4