From 56cda99edd13bb8ae13fe517b0e800f93665626e Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sat, 10 Mar 2012 22:57:01 +0530 Subject: [PATCH] fixup CWD in access(); see below Calling access() changes the CWD to $GL_REPO_BASE! This causes a problem in the update script -- you're suddenly in the wrong directory after calling access()! This is actually happening inside load_1(), so fix that. --- src/Gitolite/Conf/Load.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Gitolite/Conf/Load.pm b/src/Gitolite/Conf/Load.pm index 1b0d199..171927e 100644 --- a/src/Gitolite/Conf/Load.pm +++ b/src/Gitolite/Conf/Load.pm @@ -117,7 +117,7 @@ sub load_1 { my $repo = shift; trace( 4, $repo ); - _chdir( $rc{GL_REPO_BASE} ); + _chdir( "$rc{GL_REPO_BASE}/$repo.git" ); if ( $repo eq $last_repo ) { $repos{$repo} = $one_repo{$repo}; @@ -125,10 +125,10 @@ sub load_1 { return; } - if ( -f "$repo.git/gl-conf" ) { + if ( -f "gl-conf" ) { _die "split conf not set, gl-conf present for $repo" if not $split_conf{$repo}; - my $cc = "$repo.git/gl-conf"; + my $cc = "gl-conf"; _die "parse $cc failed: " . ( $! or $@ ) unless do $cc; $last_repo = $repo;