about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/Repo.pm15
-rw-r--r--lib/PublicInbox/RepoConfig.pm3
2 files changed, 17 insertions, 1 deletions
diff --git a/lib/PublicInbox/Repo.pm b/lib/PublicInbox/Repo.pm
new file mode 100644
index 00000000..812b1071
--- /dev/null
+++ b/lib/PublicInbox/Repo.pm
@@ -0,0 +1,15 @@
+# Copyright (C) 2017 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+#
+# Represents a code repository, analoguos to the PublicInbox::Inbox
+# class for represpenting an inbox git repository.
+package PublicInbox::Repo;
+use strict;
+use warnings;
+
+sub new {
+        my ($class, $opts) = @_;
+        bless $opts, $class;
+}
+
+1;
diff --git a/lib/PublicInbox/RepoConfig.pm b/lib/PublicInbox/RepoConfig.pm
index 32346852..7a1b316c 100644
--- a/lib/PublicInbox/RepoConfig.pm
+++ b/lib/PublicInbox/RepoConfig.pm
@@ -5,6 +5,7 @@ use strict;
 use warnings;
 use PublicInbox::Inbox;
 use PublicInbox::Config;
+use PublicInbox::Repo;
 require PublicInbox::Hval;
 
 sub new {
@@ -82,7 +83,7 @@ sub lookup {
 
         # of course git is the default VCS
         $rv->{vcs} ||= 'git';
-        $self->{-cache}->{$repo_path} = $rv;
+        $self->{-cache}->{$repo_path} = PublicInbox::Repo->new($rv);
 }
 
 1;