(fix bugly) info -ld should handle missing description files more gracefully

bugly = bug that makes the output ugly :)
This commit is contained in:
Sitaram Chamarty 2012-05-22 22:32:11 +05:30
parent 2907561529
commit dd083085cf

View file

@ -80,13 +80,17 @@ sub print_phy_repos {
sub listem { sub listem {
my ( $repos, $lc, $ld, @aa ) = @_; my ( $repos, $lc, $ld, @aa ) = @_;
my $creator = ''; my $creator = '';
my $desc = '';
for my $repo (@$repos) { for my $repo (@$repos) {
next unless $repo =~ /$patt/; next unless $repo =~ /$patt/;
my $perm = ''; my $perm = '';
$creator = creator($repo) if $lc; $creator = creator($repo) if $lc;
$desc = slurp("$ENV{GL_REPO_BASE}/$repo.git/description") if $ld;
chomp($desc); my $desc = '';
for my $d ("$ENV{GL_REPO_BASE}/$repo.git/description") {
next unless $ld and -r $d;
$desc = slurp($d);
chomp($desc);
}
for my $aa (@aa) { for my $aa (@aa) {
my $ret = access( $repo, $ENV{GL_USER}, $aa, 'any' ); my $ret = access( $repo, $ENV{GL_USER}, $aa, 'any' );