about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-02-17 03:31:16 +0000
committerEric Wong <e@80x24.org>2017-02-17 03:31:16 +0000
commit8d83eab9d95348e996a2d1f92d970ddc0bf4f85b (patch)
treeeb71f3f484084b2c1b4bc50446ad035e8b95e111 /lib/PublicInbox
parente7dc3224ad0b497da6ef242e3a9c612c5702514e (diff)
downloadpublic-inbox-8d83eab9d95348e996a2d1f92d970ddc0bf4f85b.tar.gz
This name is shorter and matches terminology in gitweb and
other popular git web viewers.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/RepoGitRaw.pm (renamed from lib/PublicInbox/RepoGitPlain.pm)10
-rw-r--r--lib/PublicInbox/RepoGitTree.pm10
-rw-r--r--lib/PublicInbox/Repobrowse.pm4
3 files changed, 12 insertions, 12 deletions
diff --git a/lib/PublicInbox/RepoGitPlain.pm b/lib/PublicInbox/RepoGitRaw.pm
index 8aff2177..ce6d7e73 100644
--- a/lib/PublicInbox/RepoGitPlain.pm
+++ b/lib/PublicInbox/RepoGitRaw.pm
@@ -1,6 +1,6 @@
 # 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::RepoGitPlain;
+package PublicInbox::RepoGitRaw;
 use strict;
 use warnings;
 use base qw(PublicInbox::RepoBase);
@@ -8,7 +8,7 @@ use PublicInbox::RepoGitBlob;
 use PublicInbox::Hval qw(utf8_html);
 use PublicInbox::Qspawn;
 
-sub call_git_plain {
+sub call_git_raw {
         my ($self, $req) = @_;
         my $repo = $req->{-repo};
         my $git = $repo->{git};
@@ -24,7 +24,7 @@ sub call_git_plain {
                 $type = 'text/plain';
         } elsif ($type eq 'tree') {
                 $git->cat_file_finish($left);
-                return git_tree_plain($req, $git, $hex);
+                return git_tree_raw($req, $git, $hex);
         } else {
                 $type = 'application/octet-stream';
         }
@@ -59,14 +59,14 @@ sub git_tree_sed ($) {
 
 # This should follow the cgit DOM structure in case anybody depends on it,
 # not using <pre> here as we don't expect people to actually view it much
-sub git_tree_plain {
+sub git_tree_raw {
         my ($req, $git, $hex) = @_;
 
         my @ex = @{$req->{extra}};
         my $rel = $req->{relcmd};
         my $title = utf8_html(join('/', '', @ex, ''));
         my $tslash = $req->{tslash};
-        my $pfx = $tslash ? './' : 'plain/';
+        my $pfx = $tslash ? './' : 'raw/';
         my $t = "<h2>$title</h2><ul>";
         if (@ex) {
                 if ($tslash) {
diff --git a/lib/PublicInbox/RepoGitTree.pm b/lib/PublicInbox/RepoGitTree.pm
index a4add619..5b428da0 100644
--- a/lib/PublicInbox/RepoGitTree.pm
+++ b/lib/PublicInbox/RepoGitTree.pm
@@ -83,16 +83,16 @@ sub git_blob_show {
         my $n = 0;
 
         my $rel = $req->{relcmd};
-        my $plain = join('/',
-                        "${rel}plain", $req->{-repo}->tip, @{$req->{extra}});
-        $plain = PublicInbox::Hval->utf8($plain)->as_path;
+        my $raw = join('/',
+                        "${rel}raw", $req->{-repo}->tip, @{$req->{extra}});
+        $raw = PublicInbox::Hval->utf8($raw)->as_path;
         my $t = cur_path($req);
         my $s = qq{\npath: $t\n\nblob $hex};
         my $end = '';
 
         $git->cat_file($hex, sub {
                 my ($cat, $left) = @_; # $$left == $size
-                $s .= qq{\t$$left bytes (<a\nhref="$plain">raw</a>)};
+                $s .= qq{\t$$left bytes (<a\nhref="$raw">raw</a>)};
                 $to_read = $$left if $to_read > $$left;
                 my $r = read($cat, my $buf, $to_read);
                 return unless defined($r) && $r > 0;
@@ -172,7 +172,7 @@ sub git_tree_sed ($) {
                         elsif ($m eq 'l') { $path = "<i>$path</i>" }
                         $s =~ s/\s+//g;
 
-                        # 'plain' and 'log' links intentionally omitted
+                        # 'raw' and 'log' links intentionally omitted
                         # for brevity and speed
                         $dst .= qq($m\t).
                                 qq($s\t<a\nhref="$pfx/$ref">$path</a>\n);
diff --git a/lib/PublicInbox/Repobrowse.pm b/lib/PublicInbox/Repobrowse.pm
index 34ffd542..de5bd364 100644
--- a/lib/PublicInbox/Repobrowse.pm
+++ b/lib/PublicInbox/Repobrowse.pm
@@ -23,7 +23,7 @@ use warnings;
 use URI::Escape qw(uri_escape_utf8);
 use PublicInbox::RepoConfig;
 
-my %CMD = map { lc($_) => $_ } qw(Log Commit Tree Patch Blob Plain Tag Atom
+my %CMD = map { lc($_) => $_ } qw(Log Commit Tree Patch Blob Raw Tag Atom
         Diff Snapshot);
 my %VCS = (git => 'Git');
 my %LOADED;
@@ -57,7 +57,7 @@ sub base_url ($) {
 
 # Remove trailing slash in URLs which regular humans are likely to read
 # in an attempt to improve cache hit ratios.  Do not redirect
-# plain|patch|blob|fallback endpoints since those could be using
+# raw|patch|blob|fallback endpoints since those could be using
 # automated tools which may not follow redirects automatically
 # (e.g. curl does not follow 301 unless given "-L")
 my %NO_TSLASH = map { $_ => 1 } qw(Log Commit Tree Summary Tag);