From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1014C20248; Mon, 15 Apr 2019 06:53:19 +0000 (UTC) Date: Mon, 15 Apr 2019 06:53:19 +0000 From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/5] config: fix regression in repo.path => coderepo.dir mapping Message-ID: <20190415065319.GA8421@dcvr> References: <20190405200429.16973-1-e@80x24.org> <20190405200429.16973-4-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190405200429.16973-4-e@80x24.org> List-Id: We parse cgitrc for "repo.path", while we use "coderepo.dir" to mean the same thing for non-cgit users. So I ended up confusing myself, here. But then again, git uses "--git-dir" and "GIT_DIR", so I suspect "dir" is the better choice than "path", here --- lib/PublicInbox/Config.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 2e6f493..cdc939a 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -297,11 +297,11 @@ sub parse_cgitrc { chomp; if (m!\Arepo\.url=(.+?)/*\z!) { my $nick = $1; - cgit_repo_merge($self, $repo->{path}, $repo) if $repo; + cgit_repo_merge($self, $repo->{dir}, $repo) if $repo; $repo = { url => $nick }; } elsif (m!\Arepo\.path=(.+)\z!) { if (defined $repo) { - $repo->{path} = $1; + $repo->{dir} = $1; } else { warn "$_ without repo.url\n"; } @@ -326,7 +326,7 @@ sub parse_cgitrc { $self->{-cgit_static}->{$1} = 1; } } - cgit_repo_merge($self, $repo->{path}, $repo) if $repo; + cgit_repo_merge($self, $repo->{dir}, $repo) if $repo; } # parse a code repo -- EW