user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/7] www: /s/: 404 for unconfigured coderepos
  2022-08-22  2:33  6% [PATCH 0/7] an even bigger git show than before Eric Wong
@ 2022-08-22  2:33  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-22  2:33 UTC (permalink / raw)
  To: meta

The $r404 variable is unset if we have a valid inbox, but no
coderepos configured for that inbox, thus we must `r(404)'
explicitly.
---
 lib/PublicInbox/WWW.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm
index a33709e9..77f463d3 100644
--- a/lib/PublicInbox/WWW.pm
+++ b/lib/PublicInbox/WWW.pm
@@ -303,7 +303,8 @@ sub get_text {
 sub get_vcs_object ($$$;$) {
 	my ($ctx, $inbox, $oid, $filename) = @_;
 	my $r404 = invalid_inbox($ctx, $inbox);
-	return $r404 if $r404 || !$ctx->{www}->{pi_cfg}->repo_objs($ctx->{ibx});
+	return $r404 if $r404;
+	return r(404) if !$ctx->{www}->{pi_cfg}->repo_objs($ctx->{ibx});
 	require PublicInbox::ViewVCS;
 	PublicInbox::ViewVCS::show($ctx, $oid, $filename);
 }

^ permalink raw reply related	[relevance 7%]

* [PATCH 0/7] an even bigger git show than before...
@ 2022-08-22  2:33  6% Eric Wong
  2022-08-22  2:33  7% ` [PATCH 3/7] www: /s/: 404 for unconfigured coderepos Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-08-22  2:33 UTC (permalink / raw)
  To: meta

We can do things with patch emails, we might as well do some
things with git commits for folks with coderepos configured.

Eric Wong (7):
  config: fix confusing space in ->repo_objs
  xt/solver: improve diagnostics
  www: /s/: 404 for unconfigured coderepos
  qspawn: add type comments in a few places
  qspawn: improve error reporting and handling
  viewvcs: drop pointless variable assignment
  viewvcs: start improving display of git commits

 lib/PublicInbox/Config.pm    |   2 +-
 lib/PublicInbox/LeiBlob.pm   |   4 +-
 lib/PublicInbox/Qspawn.pm    |  33 +++++-----
 lib/PublicInbox/SolverGit.pm |  28 ++++-----
 lib/PublicInbox/ViewVCS.pm   | 116 +++++++++++++++++++++++++++++++----
 lib/PublicInbox/WWW.pm       |   3 +-
 lib/PublicInbox/WwwStream.pm |   9 +++
 t/qspawn.t                   |  14 ++++-
 xt/solver.t                  |   7 +--
 9 files changed, 162 insertions(+), 54 deletions(-)

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-22  2:33  6% [PATCH 0/7] an even bigger git show than before Eric Wong
2022-08-22  2:33  7% ` [PATCH 3/7] www: /s/: 404 for unconfigured coderepos 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).