]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: shorten internal names
authorEric Wong <e@80x24.org>
Thu, 9 Feb 2017 01:37:03 +0000 (01:37 +0000)
committerEric Wong <e@80x24.org>
Thu, 9 Feb 2017 01:37:03 +0000 (01:37 +0000)
We'll still be keeping "repobrowse" for the public API
for use with .psgi files, but shortening the name means
less typing and we may have command-line tools, too.

21 files changed:
MANIFEST
lib/PublicInbox/RepoBase.pm [moved from lib/PublicInbox/RepobrowseBase.pm with 97% similarity]
lib/PublicInbox/RepoConfig.pm [moved from lib/PublicInbox/RepobrowseConfig.pm with 98% similarity]
lib/PublicInbox/RepoGit.pm [moved from lib/PublicInbox/RepobrowseGit.pm with 94% similarity]
lib/PublicInbox/RepoGitAtom.pm [moved from lib/PublicInbox/RepobrowseGitAtom.pm with 96% similarity]
lib/PublicInbox/RepoGitBlob.pm [moved from lib/PublicInbox/RepobrowseGitBlob.pm with 93% similarity]
lib/PublicInbox/RepoGitCommit.pm [moved from lib/PublicInbox/RepobrowseGitCommit.pm with 94% similarity]
lib/PublicInbox/RepoGitDiff.pm [moved from lib/PublicInbox/RepobrowseGitDiff.pm with 92% similarity]
lib/PublicInbox/RepoGitDiffCommon.pm [moved from lib/PublicInbox/RepobrowseGitDiffCommon.pm with 98% similarity]
lib/PublicInbox/RepoGitFallback.pm [moved from lib/PublicInbox/RepobrowseGitFallback.pm with 80% similarity]
lib/PublicInbox/RepoGitLog.pm [moved from lib/PublicInbox/RepobrowseGitLog.pm with 94% similarity]
lib/PublicInbox/RepoGitPatch.pm [moved from lib/PublicInbox/RepobrowseGitPatch.pm with 88% similarity]
lib/PublicInbox/RepoGitPlain.pm [moved from lib/PublicInbox/RepobrowseGitPlain.pm with 93% similarity]
lib/PublicInbox/RepoGitQuery.pm [moved from lib/PublicInbox/RepobrowseGitQuery.pm with 96% similarity]
lib/PublicInbox/RepoGitSnapshot.pm [moved from lib/PublicInbox/RepobrowseGitSnapshot.pm with 95% similarity]
lib/PublicInbox/RepoGitSummary.pm [moved from lib/PublicInbox/RepobrowseGitSummary.pm with 97% similarity]
lib/PublicInbox/RepoGitTag.pm [moved from lib/PublicInbox/RepobrowseGitTag.pm with 97% similarity]
lib/PublicInbox/RepoGitTree.pm [moved from lib/PublicInbox/RepobrowseGitTree.pm with 97% similarity]
lib/PublicInbox/RepoRoot.pm [moved from lib/PublicInbox/RepobrowseRoot.pm with 96% similarity]
lib/PublicInbox/Repobrowse.pm
t/repobrowse_git.t

index d0223c655c5dd46e43b9f246aa83af01f307b9b7..a59d9dcc27bc60d5a08c0f6aa5990202d86e6492 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -80,27 +80,27 @@ lib/PublicInbox/NewsWWW.pm
 lib/PublicInbox/ParentPipe.pm
 lib/PublicInbox/ProcessPipe.pm
 lib/PublicInbox/Qspawn.pm
+lib/PublicInbox/RepoBase.pm
+lib/PublicInbox/RepoConfig.pm
+lib/PublicInbox/RepoGit.pm
+lib/PublicInbox/RepoGitAtom.pm
+lib/PublicInbox/RepoGitBlob.pm
+lib/PublicInbox/RepoGitCommit.pm
+lib/PublicInbox/RepoGitDiff.pm
+lib/PublicInbox/RepoGitDiffCommon.pm
+lib/PublicInbox/RepoGitFallback.pm
+lib/PublicInbox/RepoGitLog.pm
+lib/PublicInbox/RepoGitPatch.pm
+lib/PublicInbox/RepoGitPlain.pm
+lib/PublicInbox/RepoGitQuery.pm
 lib/PublicInbox/RepoGitSearch.pm
 lib/PublicInbox/RepoGitSearchIdx.pm
+lib/PublicInbox/RepoGitSnapshot.pm
+lib/PublicInbox/RepoGitSummary.pm
+lib/PublicInbox/RepoGitTag.pm
+lib/PublicInbox/RepoGitTree.pm
+lib/PublicInbox/RepoRoot.pm
 lib/PublicInbox/Repobrowse.pm
-lib/PublicInbox/RepobrowseBase.pm
-lib/PublicInbox/RepobrowseConfig.pm
-lib/PublicInbox/RepobrowseGit.pm
-lib/PublicInbox/RepobrowseGitAtom.pm
-lib/PublicInbox/RepobrowseGitBlob.pm
-lib/PublicInbox/RepobrowseGitCommit.pm
-lib/PublicInbox/RepobrowseGitDiff.pm
-lib/PublicInbox/RepobrowseGitDiffCommon.pm
-lib/PublicInbox/RepobrowseGitFallback.pm
-lib/PublicInbox/RepobrowseGitLog.pm
-lib/PublicInbox/RepobrowseGitPatch.pm
-lib/PublicInbox/RepobrowseGitPlain.pm
-lib/PublicInbox/RepobrowseGitQuery.pm
-lib/PublicInbox/RepobrowseGitSnapshot.pm
-lib/PublicInbox/RepobrowseGitSummary.pm
-lib/PublicInbox/RepobrowseGitTag.pm
-lib/PublicInbox/RepobrowseGitTree.pm
-lib/PublicInbox/RepobrowseRoot.pm
 lib/PublicInbox/SaPlugin/ListMirror.pm
 lib/PublicInbox/Search.pm
 lib/PublicInbox/SearchIdx.pm
similarity index 97%
rename from lib/PublicInbox/RepobrowseBase.pm
rename to lib/PublicInbox/RepoBase.pm
index 44f422df3e09b375ef168899b677fc845cfa5052..e60677d65dc2381f2ee4ea261a123158c5d56a20 100644 (file)
@@ -1,9 +1,9 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepobrowseBase;
+package PublicInbox::RepoBase;
 use strict;
 use warnings;
-require PublicInbox::RepobrowseGitQuery;
+require PublicInbox::RepoGitQuery;
 use PublicInbox::Hval;
 our %MIME_TYPE_WHITELIST = ('application/pdf' => 1);
 
similarity index 98%
rename from lib/PublicInbox/RepobrowseConfig.pm
rename to lib/PublicInbox/RepoConfig.pm
index a08c6cecdf348c4100672e5de1816f4ff93cdb34..323468525cc35ed4efe985c631849e4b58b3e1ce 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepobrowseConfig;
+package PublicInbox::RepoConfig;
 use strict;
 use warnings;
 use PublicInbox::Inbox;
similarity index 94%
rename from lib/PublicInbox/RepobrowseGit.pm
rename to lib/PublicInbox/RepoGit.pm
index eb79e56346b764c088401a059c40200c312a8820..f7bf0b9d537683085ab16f020d04a0dfffc87cbf 100644 (file)
@@ -1,8 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ (https://www.gnu.org/licenses/agpl-3.0.txt)
 
-# common functions used by other RepobrowseGit* modules
-package PublicInbox::RepobrowseGit;
+# common functions used by other RepoGit* modules
+package PublicInbox::RepoGit;
 use strict;
 use warnings;
 use base qw(Exporter);
similarity index 96%
rename from lib/PublicInbox/RepobrowseGitAtom.pm
rename to lib/PublicInbox/RepoGitAtom.pm
index 65b723c4c2384e84fe9776d55a0f5be7537be0dd..a9f40126160823d299d163a605e99efe27a1180f 100644 (file)
@@ -2,11 +2,11 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # show log as an Atom feed
-package PublicInbox::RepobrowseGitAtom;
+package PublicInbox::RepoGitAtom;
 use strict;
 use warnings;
 use PublicInbox::Hval qw(utf8_html);
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Qspawn;
 
 use constant DATEFMT => '%Y-%m-%dT%H:%M:%SZ';
@@ -139,7 +139,7 @@ sub call_git_atom {
 
        my $git = $repo_info->{git};
        my $env = $req->{env};
-       my $q =$req->{'q'} = PublicInbox::RepobrowseGitQuery->new($env);
+       my $q =$req->{'q'} = PublicInbox::RepoGitQuery->new($env);
        my $h = $q->{h};
        my $read_log = sub {
                my $cmd = $git->cmd(qw(log --no-notes --no-color
similarity index 93%
rename from lib/PublicInbox/RepobrowseGitBlob.pm
rename to lib/PublicInbox/RepoGitBlob.pm
index a11c457ce9830bf4926ba50ca179fbc124acd4c3..586b4acc4f3b2579e2fec3bce115f661f14c6320 100644 (file)
@@ -2,17 +2,17 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Show a blob as-is
-package PublicInbox::RepobrowseGitBlob;
+package PublicInbox::RepoGitBlob;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use base qw(Exporter);
 our @EXPORT = qw(git_blob_mime_type git_blob_stream_response);
 
 sub call_git_blob {
        my ($self, $req) = @_;
        my $git = $req->{repo_info}->{git};
-       my $q = PublicInbox::RepobrowseGitQuery->new($req->{env});
+       my $q = PublicInbox::RepoGitQuery->new($req->{env});
        my $id = $q->{id};
        $id eq '' and $id = 'HEAD';
        $id .= ":$req->{expath}";
similarity index 94%
rename from lib/PublicInbox/RepobrowseGitCommit.pm
rename to lib/PublicInbox/RepoGitCommit.pm
index 6eadd2e54d95d47e3028d0f530807f2e21b872bd..e98c3c1819cddc20b69cce3453867a44cf2dda1d 100644 (file)
 # punish the common case with extra bytes if somebody uses 'D' or 'P'
 # in filenames.
 
-package PublicInbox::RepobrowseGitCommit;
+package PublicInbox::RepoGitCommit;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Hval qw(utf8_html to_attr);
-use PublicInbox::RepobrowseGit qw(git_unquote git_commit_title);
-use PublicInbox::RepobrowseGitDiffCommon;
+use PublicInbox::RepoGit qw(git_unquote git_commit_title);
+use PublicInbox::RepoGitDiffCommon;
 use PublicInbox::Qspawn;
 
 use constant GIT_FMT => '--pretty=format:'.join('%n',
@@ -116,10 +116,10 @@ sub git_commit_sed ($$) {
        }
 }
 
-sub call_git_commit { # RepobrowseBase calls this
+sub call_git_commit { # RepoBase calls this
        my ($self, $req) = @_;
        my $env = $req->{env};
-       my $q = PublicInbox::RepobrowseGitQuery->new($env);
+       my $q = PublicInbox::RepoGitQuery->new($env);
        my $id = $q->{id};
        $id eq '' and $id = 'HEAD';
 
similarity index 92%
rename from lib/PublicInbox/RepobrowseGitDiff.pm
rename to lib/PublicInbox/RepoGitDiff.pm
index e2b7179fb71c11fa697190582c83711db4cdca92..bb71e7385fbf91179d471741a1bb7f269c2dd6c2 100644 (file)
@@ -6,12 +6,12 @@
 #
 # We probably will not link to this outright because it's expensive,
 # but exists to preserve URL compatibility with cgit.
-package PublicInbox::RepobrowseGitDiff;
+package PublicInbox::RepoGitDiff;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Hval qw(utf8_html);
-use PublicInbox::RepobrowseGitDiffCommon;
+use PublicInbox::RepoGitDiffCommon;
 use PublicInbox::Qspawn;
 
 sub git_diff_sed ($$) {
@@ -35,7 +35,7 @@ sub git_diff_sed ($$) {
 sub call_git_diff {
        my ($self, $req) = @_;
        my $env = $req->{env};
-       my $q = PublicInbox::RepobrowseGitQuery->new($env);
+       my $q = PublicInbox::RepoGitQuery->new($env);
        my $id = $q->{id};
        my $id2 = $q->{id2};
 
similarity index 98%
rename from lib/PublicInbox/RepobrowseGitDiffCommon.pm
rename to lib/PublicInbox/RepoGitDiffCommon.pm
index 968ca7a7c368c2492323138fd3374e5d9c1b3f8d..0604f9dd4549447ae6612aa139ba9d75ebf8c95d 100644 (file)
@@ -2,10 +2,10 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # common git diff-related code
-package PublicInbox::RepobrowseGitDiffCommon;
+package PublicInbox::RepoGitDiffCommon;
 use strict;
 use warnings;
-use PublicInbox::RepobrowseGit qw/git_unquote git_commit_title/;
+use PublicInbox::RepoGit qw/git_unquote git_commit_title/;
 use PublicInbox::Hval qw/utf8_html to_attr/;
 use base qw/Exporter/;
 our @EXPORT = qw/git_diff_sed_init git_diff_sed_close git_diff_sed_run
similarity index 80%
rename from lib/PublicInbox/RepobrowseGitFallback.pm
rename to lib/PublicInbox/RepoGitFallback.pm
index 38640139228a99afad56e09a57ae6f0f0f9f04c5..5ce469be21880433d2d722127a42cc42fe293051 100644 (file)
@@ -3,13 +3,13 @@
 
 # when no endpoints match, fallback to this and serve a static file
 # This can serve Smart HTTP in the future.
-package PublicInbox::RepobrowseGitFallback;
+package PublicInbox::RepoGitFallback;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::GitHTTPBackend;
 
-# overrides PublicInbox::RepobrowseBase::call
+# overrides PublicInbox::RepoBase::call
 sub call {
        my ($self, undef, $req) = @_;
        my $expath = $req->{expath};
similarity index 94%
rename from lib/PublicInbox/RepobrowseGitLog.pm
rename to lib/PublicInbox/RepoGitLog.pm
index 85593cb8503695d3242d53aad37fa1dd28b97b37..9cfa526e7e310dec9b5ade5c9e5a843a4b5c7c1a 100644 (file)
@@ -2,12 +2,12 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # show the log view
-package PublicInbox::RepobrowseGitLog;
+package PublicInbox::RepoGitLog;
 use strict;
 use warnings;
 use PublicInbox::Hval qw(utf8_html);
-use base qw(PublicInbox::RepobrowseBase);
-use PublicInbox::RepobrowseGit qw(git_dec_links git_commit_title);
+use base qw(PublicInbox::RepoBase);
+use PublicInbox::RepoGit qw(git_dec_links git_commit_title);
 use PublicInbox::Qspawn;
 # cannot rely on --date=format-local:... yet, it is too new (September 2015)
 use constant STATES => qw(h p D ai an s b);
@@ -126,7 +126,7 @@ sub call_git_log {
        $max = int($max);
        $max = 50 if $max == 0;
        my $env = $req->{env};
-       my $q = $req->{'q'} = PublicInbox::RepobrowseGitQuery->new($env);
+       my $q = $req->{'q'} = PublicInbox::RepoGitQuery->new($env);
        my $h = $q->{h};
        $h eq '' and $h = 'HEAD';
        my $git = $repo_info->{git};
similarity index 88%
rename from lib/PublicInbox/RepobrowseGitPatch.pm
rename to lib/PublicInbox/RepoGitPatch.pm
index 5ae768e8faf26de00c1d79b1d3f70c44b33d358c..e9227b6fe5136102eff7d03b82ed6f2eda22a119 100644 (file)
@@ -3,10 +3,10 @@
 
 # shows the /patch/ endpoint for git repositories
 # usage: /repo.git/patch?id=COMMIT_ID
-package PublicInbox::RepobrowseGitPatch;
+package PublicInbox::RepoGitPatch;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Qspawn;
 
 # try to be educational and show the command-line used in the signature
@@ -17,7 +17,7 @@ sub call_git_patch {
        my ($self, $req) = @_;
        my $git = $req->{repo_info}->{git};
        my $env = $req->{env};
-       my $q = PublicInbox::RepobrowseGitQuery->new($env);
+       my $q = PublicInbox::RepoGitQuery->new($env);
        my $id = $q->{id};
        $id =~ /\A[\w-]+([~\^][~\^\d])*\z/ or $id = 'HEAD';
 
similarity index 93%
rename from lib/PublicInbox/RepobrowseGitPlain.pm
rename to lib/PublicInbox/RepoGitPlain.pm
index 24cc70b042d56de659ccdbca20afdef99aada57e..2ba24e08f5888390182f443778eb1b3e80e0e446 100644 (file)
@@ -1,17 +1,17 @@
 # Copyright (C) 2015-2016 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepobrowseGitPlain;
+package PublicInbox::RepoGitPlain;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
-use PublicInbox::RepobrowseGitBlob;
+use base qw(PublicInbox::RepoBase);
+use PublicInbox::RepoGitBlob;
 use PublicInbox::Hval qw(utf8_html);
 use PublicInbox::Qspawn;
 
 sub call_git_plain {
        my ($self, $req) = @_;
        my $git = $req->{repo_info}->{git};
-       my $q = PublicInbox::RepobrowseGitQuery->new($req->{env});
+       my $q = PublicInbox::RepoGitQuery->new($req->{env});
        my $id = $q->{id};
        $id eq '' and $id = 'HEAD';
        $id .= ":$req->{expath}";
similarity index 96%
rename from lib/PublicInbox/RepobrowseGitQuery.pm
rename to lib/PublicInbox/RepoGitQuery.pm
index 1140f6faf8fac1ad7222f076f68b07a4ad159e8d..638a13160b34e2a84266141e5203728c6347cc3b 100644 (file)
@@ -2,7 +2,7 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # query parameter management for repobrowse
-package PublicInbox::RepobrowseGitQuery;
+package PublicInbox::RepoGitQuery;
 use strict;
 use warnings;
 use PublicInbox::Hval;
similarity index 95%
rename from lib/PublicInbox/RepobrowseGitSnapshot.pm
rename to lib/PublicInbox/RepoGitSnapshot.pm
index 450fdad6e05bb51ea5f296ce6b9c7119a0a1282a..e05ad80cd08962b77ab9dddced04688c9f1d904d 100644 (file)
@@ -5,10 +5,10 @@
 # Mainly for compatibility reasons with cgit, I'm unsure if
 # showing this in a repository viewer is a good idea.
 
-package PublicInbox::RepobrowseGitSnapshot;
+package PublicInbox::RepoGitSnapshot;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Git;
 use PublicInbox::Qspawn;
 our $SUFFIX;
@@ -33,7 +33,7 @@ our %FMT_TYPES = (
        'zip' => 'application/x-zip',
 );
 
-sub call_git_snapshot ($$) { # invoked by PublicInbox::RepobrowseBase::call
+sub call_git_snapshot ($$) { # invoked by PublicInbox::RepoBase::call
        my ($self, $req) = @_;
 
        my @extra = @{$req->{extra}};
similarity index 97%
rename from lib/PublicInbox/RepobrowseGitSummary.pm
rename to lib/PublicInbox/RepoGitSummary.pm
index e7739ecdee905af5ee1961015dff409d63f7f9e9..e9e1458b33da97520ed1d04d3fe81d5dee1595f3 100644 (file)
@@ -2,11 +2,11 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # The main summary/landing page of a git repository viewer
-package PublicInbox::RepobrowseGitSummary;
+package PublicInbox::RepoGitSummary;
 use strict;
 use warnings;
 use PublicInbox::Hval qw(utf8_html);
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Qspawn;
 
 sub call_git_summary {
similarity index 97%
rename from lib/PublicInbox/RepobrowseGitTag.pm
rename to lib/PublicInbox/RepoGitTag.pm
index 1d26eab059d137205320708e34ff2a94b6d5299b..96835b2cd7fb48d4bc565293683d2ef531fc37e3 100644 (file)
@@ -2,10 +2,10 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # shows the /tag/ endpoint for git repositories
-package PublicInbox::RepobrowseGitTag;
+package PublicInbox::RepoGitTag;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use POSIX qw(strftime);
 use PublicInbox::Hval qw(utf8_html);
 use PublicInbox::Qspawn;
@@ -19,7 +19,7 @@ my %cmd_map = ( # type => action
 sub call_git_tag {
        my ($self, $req) = @_;
 
-       my $q = PublicInbox::RepobrowseGitQuery->new($req->{env});
+       my $q = PublicInbox::RepoGitQuery->new($req->{env});
        my $h = $q->{h};
        $h eq '' and return git_tag_list($self, $req);
        sub {
similarity index 97%
rename from lib/PublicInbox/RepobrowseGitTree.pm
rename to lib/PublicInbox/RepoGitTree.pm
index c242fd1a8e0cd98d60e7bceef50a01364ec0dfc0..4a68cf69c963807987275d5108fc7abaca7672f5 100644 (file)
@@ -1,9 +1,9 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-package PublicInbox::RepobrowseGitTree;
+package PublicInbox::RepoGitTree;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Hval qw(utf8_html);
 use PublicInbox::Qspawn;
 
@@ -21,7 +21,7 @@ sub call_git_tree {
        my ($self, $req) = @_;
        my @extra = @{$req->{extra}};
        my $git = $req->{repo_info}->{git};
-       my $q = PublicInbox::RepobrowseGitQuery->new($req->{env});
+       my $q = PublicInbox::RepoGitQuery->new($req->{env});
        my $id = $q->{id};
        if ($id eq '') {
                chomp($id = $git->qx(qw(rev-parse --short=10 HEAD)));
similarity index 96%
rename from lib/PublicInbox/RepobrowseRoot.pm
rename to lib/PublicInbox/RepoRoot.pm
index fda964377631688c0f01a8457e5f59006c90c521..9ab25b977621ea1275d12860090181d8c726dd2a 100644 (file)
@@ -2,10 +2,10 @@
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # displays the root '/' where all the projects lie
-package PublicInbox::RepobrowseRoot;
+package PublicInbox::RepoRoot;
 use strict;
 use warnings;
-use base qw(PublicInbox::RepobrowseBase);
+use base qw(PublicInbox::RepoBase);
 use PublicInbox::Hval qw(utf8_html);
 
 sub call {
index 1050ed5028aa45366dc64b0e281a90392fc5fbd2..87e1227802fc79e082e10442d9c7ce230e5937bb 100644 (file)
@@ -21,7 +21,7 @@ package PublicInbox::Repobrowse;
 use strict;
 use warnings;
 use URI::Escape qw(uri_escape_utf8 uri_unescape);
-use PublicInbox::RepobrowseConfig;
+use PublicInbox::RepoConfig;
 
 my %CMD = map { lc($_) => $_ } qw(Log Commit Tree Patch Blob Plain Tag Atom
        Diff Snapshot);
@@ -30,7 +30,7 @@ my %LOADED;
 
 sub new {
        my ($class, $rconfig) = @_;
-       $rconfig ||= PublicInbox::RepobrowseConfig->new;
+       $rconfig ||= PublicInbox::RepoConfig->new;
        bless { rconfig => $rconfig }, $class;
 }
 
@@ -80,8 +80,8 @@ sub no_tslash {
 
 sub root_index {
        my ($self) = @_;
-       my $mod = load_once('PublicInbox::RepobrowseRoot');
-       $mod->new->call($self->{rconfig}); # RepobrowseRoot::call
+       my $mod = load_once('PublicInbox::RepoRoot');
+       $mod->new->call($self->{rconfig}); # RepoRoot::call
 }
 
 sub call {
@@ -97,7 +97,7 @@ sub call {
 
        return $self->root_index($self) unless length($repo_path);
 
-       my $rconfig = $self->{rconfig}; # RepobrowseConfig
+       my $rconfig = $self->{rconfig}; # RepoConfig
        my $repo_info;
        until ($repo_info = $rconfig->lookup($repo_path)) {
                my $p = shift @extra or last;
@@ -141,14 +141,14 @@ sub call {
        return no_tslash($env) if ($tslash && $NO_TSLASH{$mod});
 
        $req->{tslash} = $tslash;
-       $mod = load_once("PublicInbox::Repobrowse$vcs$mod");
+       $mod = load_once("PublicInbox::Repo$vcs$mod");
        $vcs = load_once("PublicInbox::$vcs");
 
        # $repo_info->{git} ||= PublicInbox::Git->new(...)
        $repo_info->{$vcs_lc} ||= $vcs->new($repo_info->{path});
 
        $req->{expath} = join('/', @extra);
-       my $rv = eval { $mod->new->call($cmd, $req) }; # RepobrowseBase::call
+       my $rv = eval { $mod->new->call($cmd, $req) }; # RepoBase::call
        $rv || r404();
 }
 
index 6ae7475bbe94f63bd1d6c13761ed6456a692b142..0ac977f34070e025f1ca9f80d6a9ccab8e09f01e 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 use Test::More;
-use PublicInbox::RepobrowseGit qw(git_unquote);
+use PublicInbox::RepoGit qw(git_unquote);
 
 is("foo\nbar", git_unquote('"foo\\nbar"'), 'unquoted newline');
 is("ElĂ©anor", git_unquote('"El\\303\\251anor"'), 'unquoted octal');