From dd083085cf8714b96746bb881cfb3a400f4f5ed8 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 22 May 2012 22:32:11 +0530 Subject: [PATCH] (fix bugly) info -ld should handle missing description files more gracefully bugly = bug that makes the output ugly :) --- src/commands/info | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/info b/src/commands/info index daf3ad2..d5ff810 100755 --- a/src/commands/info +++ b/src/commands/info @@ -80,13 +80,17 @@ sub print_phy_repos { sub listem { my ( $repos, $lc, $ld, @aa ) = @_; my $creator = ''; - my $desc = ''; for my $repo (@$repos) { next unless $repo =~ /$patt/; my $perm = ''; $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) { my $ret = access( $repo, $ENV{GL_USER}, $aa, 'any' );