diff --git a/src/gitolite.pm b/src/gitolite.pm index 9bdf456..e2f24f4 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -146,7 +146,7 @@ sub list_phy_repos my @phy_repos; 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); $repo =~ s(\./(.*)\.git$)($1); 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"; 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); $actual_repo =~ s/^\.\///; $actual_repo =~ s/\.git$//; diff --git a/src/gl-install b/src/gl-install index e3734fc..4eb9e0a 100755 --- a/src/gl-install +++ b/src/gl-install @@ -94,7 +94,7 @@ EOF # 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"; -for my $repo (`find . -type d -name "*.git"`) { +for my $repo (`find . -type d -name "*.git" -prune`) { chomp ($repo); # propagate our own, plus any local admin-defined, hooks ln_sf("$GL_ADMINDIR/hooks/common", "*", "$repo/hooks"); diff --git a/src/gl-mirror-sync b/src/gl-mirror-sync index 60458a8..e946ec0 100755 --- a/src/gl-mirror-sync +++ b/src/gl-mirror-sync @@ -14,7 +14,7 @@ ssh $mirror cat \$HOME/.gitolite.rc | expand | egrep '^ *\$GL_SLAVE_MODE *= *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 cd $HOME; cd $REPO_BASE; cd $r printf "$r "