add -prune to find commands
Apparently it makes a huge difference with some kinds of network drives (guess which company's software ;-) http://groups.google.com/group/gitolite/browse_thread/thread/66b888f11dc5a365
This commit is contained in:
parent
dab35f3565
commit
1fce051ea1
|
@ -146,7 +146,7 @@ sub list_phy_repos
|
||||||
my @phy_repos;
|
my @phy_repos;
|
||||||
|
|
||||||
wrap_chdir("$ENV{GL_REPO_BASE_ABS}");
|
wrap_chdir("$ENV{GL_REPO_BASE_ABS}");
|
||||||
for my $repo (`find . -type d -name "*.git"`) {
|
for my $repo (`find . -type d -name "*.git" -prune`) {
|
||||||
chomp ($repo);
|
chomp ($repo);
|
||||||
$repo =~ s(\./(.*)\.git$)($1);
|
$repo =~ s(\./(.*)\.git$)($1);
|
||||||
push @phy_repos, $repo;
|
push @phy_repos, $repo;
|
||||||
|
@ -538,7 +538,7 @@ sub expand_wild
|
||||||
|
|
||||||
chdir("$ENV{GL_REPO_BASE_ABS}") or die "chdir $ENV{GL_REPO_BASE_ABS} failed: $!\n";
|
chdir("$ENV{GL_REPO_BASE_ABS}") or die "chdir $ENV{GL_REPO_BASE_ABS} failed: $!\n";
|
||||||
my $count = 0;
|
my $count = 0;
|
||||||
for my $actual_repo (`find . -type d -name "*.git"|sort`) {
|
for my $actual_repo (`find . -type d -name "*.git" -prune|sort`) {
|
||||||
chomp ($actual_repo);
|
chomp ($actual_repo);
|
||||||
$actual_repo =~ s/^\.\///;
|
$actual_repo =~ s/^\.\///;
|
||||||
$actual_repo =~ s/\.git$//;
|
$actual_repo =~ s/\.git$//;
|
||||||
|
|
|
@ -94,7 +94,7 @@ EOF
|
||||||
|
|
||||||
# finally, hooks must be propagated to all the repos in case they changed
|
# finally, hooks must be propagated to all the repos in case they changed
|
||||||
chdir("$ENV{GL_REPO_BASE_ABS}") or die "chdir $ENV{GL_REPO_BASE_ABS} failed: $!\n";
|
chdir("$ENV{GL_REPO_BASE_ABS}") or die "chdir $ENV{GL_REPO_BASE_ABS} failed: $!\n";
|
||||||
for my $repo (`find . -type d -name "*.git"`) {
|
for my $repo (`find . -type d -name "*.git" -prune`) {
|
||||||
chomp ($repo);
|
chomp ($repo);
|
||||||
# propagate our own, plus any local admin-defined, hooks
|
# propagate our own, plus any local admin-defined, hooks
|
||||||
ln_sf("$GL_ADMINDIR/hooks/common", "*", "$repo/hooks");
|
ln_sf("$GL_ADMINDIR/hooks/common", "*", "$repo/hooks");
|
||||||
|
|
|
@ -14,7 +14,7 @@ ssh $mirror cat \$HOME/.gitolite.rc | expand | egrep '^ *\$GL_SLAVE_MODE *= *1;
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
find . -type d -name "*.git" | cut -c3- | sort | while read r
|
find . -type d -name "*.git" -prune | cut -c3- | sort | while read r
|
||||||
do
|
do
|
||||||
cd $HOME; cd $REPO_BASE; cd $r
|
cd $HOME; cd $REPO_BASE; cd $r
|
||||||
printf "$r "
|
printf "$r "
|
||||||
|
|
Loading…
Reference in a new issue