* [PATCH 1/2] githttpbackend: allow git to be a regular scalar string
2016-07-01 1:17 4% [PATCH 0/2] HTTPS smart git repository for our code Eric Wong
@ 2016-07-01 1:17 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-07-01 1:17 UTC (permalink / raw)
To: meta
No point in forcing users to pass a hashref/object to
get a single git directory.
---
lib/PublicInbox/GitHTTPBackend.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/GitHTTPBackend.pm b/lib/PublicInbox/GitHTTPBackend.pm
index 7267a1d..4f58c6b 100644
--- a/lib/PublicInbox/GitHTTPBackend.pm
+++ b/lib/PublicInbox/GitHTTPBackend.pm
@@ -80,7 +80,7 @@ sub serve_dumb {
return r(404);
}
- my $f = "$git->{git_dir}/$path";
+ my $f = (ref $git ? $git->{git_dir} : $git) . '/' . $path;
return r(404) unless -f $f && -r _; # just in case it's a FIFO :P
my @st = stat(_);
my $size = $st[7];
@@ -179,7 +179,7 @@ sub serve_smart {
my $val = $env->{$name};
$env{$name} = $val if defined $val;
}
- my $git_dir = $git->{git_dir};
+ my $git_dir = ref $git ? $git->{git_dir} : $git;
$env{GIT_HTTP_EXPORT_ALL} = '1';
$env{PATH_TRANSLATED} = "$git_dir/$path";
my %rdr = ( 0 => fileno($in) );
^ permalink raw reply related [relevance 7%]
* [PATCH 0/2] HTTPS smart git repository for our code
@ 2016-07-01 1:17 4% Eric Wong
2016-07-01 1:17 7% ` [PATCH 1/2] githttpbackend: allow git to be a regular scalar string Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-07-01 1:17 UTC (permalink / raw)
To: meta
Eating our own dogfood, git://80x24.org/public-inbox remains
available for those without curl or up-to-date TLS stack/certs.
Eric Wong (2):
githttpbackend: allow git to be a regular scalar string
update git repo location to https:// using GitHTTPBackend.pm
Documentation/dc-dlvr-spam-flow.txt | 2 +-
README | 2 +-
examples/public-inbox.psgi | 14 +++++++++++++-
examples/unsubscribe.psgi | 3 ++-
lib/PublicInbox/GitHTTPBackend.pm | 4 ++--
lib/PublicInbox/Unsubscribe.pm | 2 +-
lib/PublicInbox/WwwStream.pm | 6 +++---
7 files changed, 23 insertions(+), 10 deletions(-)
^ permalink raw reply [relevance 4%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-07-01 1:17 4% [PATCH 0/2] HTTPS smart git repository for our code Eric Wong
2016-07-01 1:17 7% ` [PATCH 1/2] githttpbackend: allow git to be a regular scalar string Eric Wong
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).