aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaram@atc.tcs.com>2015-02-04 05:13:39 +0530
committerSitaram Chamarty <sitaram@atc.tcs.com>2015-02-04 05:16:31 +0530
commitaf84e178a75e95ec965a0a7c3e067031b7513b26 (patch)
treecc36630c238afa684c1700ed6e6307b41f6e730c
parentadd missing include path to GL_LIBDIR (diff)
downloadgitolite-gentoo-af84e178a75e95ec965a0a7c3e067031b7513b26.tar.gz
gitolite-gentoo-af84e178a75e95ec965a0a7c3e067031b7513b26.tar.bz2
gitolite-gentoo-af84e178a75e95ec965a0a7c3e067031b7513b26.zip
info: get description from the 'gitweb.description'
-rwxr-xr-xsrc/commands/info15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/commands/info b/src/commands/info
index 267e4f6..08e9931 100755
--- a/src/commands/info
+++ b/src/commands/info
@@ -97,11 +97,16 @@ sub listem {
my $perm = '';
$creator = creator($repo) if $lc;
- my $desc = '';
- for my $d ("$ENV{GL_REPO_BASE}/$repo.git/description") {
- next unless $ld and -r $d;
- $desc = slurp($d);
- chomp($desc);
+ my $desc;
+ if ($ld) {
+ # use config value first, else 'description' file as second choice
+ my $k = 'gitweb.description';
+ my $d = "$ENV{GL_REPO_BASE}/$repo.git/description";
+ $desc = git_config( $repo, $k )->{$k} || '';
+ if ( !$desc and -r $d ) {
+ $desc = slurp($d);
+ chomp($desc);
+ }
}
for my $aa (@aa) {