From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 6/5] config: fix regression in repo.path => coderepo.dir mapping
Date: Mon, 15 Apr 2019 06:53:19 +0000 [thread overview]
Message-ID: <20190415065319.GA8421@dcvr> (raw)
In-Reply-To: <20190405200429.16973-4-e@80x24.org>
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
next prev parent reply other threads:[~2019-04-15 6:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 20:04 [PATCH 0/5] a few more cgit compatibility updates Eric Wong
2019-04-05 20:04 ` [PATCH 1/5] config: support cgit scan-path and scan-hidden-path Eric Wong
2019-04-05 20:04 ` [PATCH 2/5] cgit: serve static css, logo, favicon directly Eric Wong
2019-04-05 20:04 ` [PATCH 3/5] config: support more cgit directives for project lists Eric Wong
2019-04-15 6:53 ` Eric Wong [this message]
2019-04-05 20:04 ` [PATCH 4/5] doc/config: update cgit.cgi scan location Eric Wong
2019-04-05 20:04 ` [PATCH 5/5] viewdiff: document constants Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190415065319.GA8421@dcvr \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).