Permalink
Browse files

fix minor bug in handling 'desc = "some description"'

    repo foo
        desc = "foo"
        RW  =   u1
        ...etc...

The order of the clauses was parsing this like the old 'reponame = "some
description"' and end up creating a repo called 'desc'!

It would also, as a side-effect, change the repo so what you thought
were access rules for 'foo' would become access rules for 'desc'.
  • Loading branch information...
sitaramc committed May 29, 2012
1 parent 06d3398 commit 21dbe53d39c584d3845aaac7fc9458e0654fc92e
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/lib/Gitolite/Conf/Sugar.pm
@@ -131,17 +131,17 @@ sub owner_desc {
# -> config gitweb.description = some long description
for my $line (@$lines) {
- if ( $line =~ /^(\S+)(?: "(.*?)")? = "(.*)"$/ ) {
- my ( $repo, $owner, $desc ) = ( $1, $2, $3 );
- push @ret, "repo $repo";
- push @ret, "config gitweb.description = $desc";
- push @ret, "config gitweb.owner = $owner" if $owner;
- } elsif ( $line =~ /^desc = (\S.*)/ ) {
+ if ( $line =~ /^desc = (\S.*)/ ) {
push @ret, "config gitweb.description = $1";
} elsif ( $line =~ /^owner = (\S.*)/ ) {
push @ret, "config gitweb.owner = $1";
} elsif ( $line =~ /^category = (\S.*)/ ) {
push @ret, "config gitweb.category = $1";
+ } elsif ( $line =~ /^(\S+)(?: "(.*?)")? = "(.*)"$/ ) {
+ my ( $repo, $owner, $desc ) = ( $1, $2, $3 );
+ push @ret, "repo $repo";
+ push @ret, "config gitweb.description = $desc";
+ push @ret, "config gitweb.owner = $owner" if $owner;
} else {
push @ret, $line;
}

0 comments on commit 21dbe53

Please sign in to comment.