* [PATCH 09/11] solver_git: remove extraneous leading `-'
@ 2023-01-24 9:49 5% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2023-01-24 9:49 UTC (permalink / raw)
To: meta
It was a harmless negation, I must've pasted a line from a diff
and forgotten to chop off the first character :x
Fixes: 6f5b238bae5c "solver: early make hints detection more robust"
---
lib/PublicInbox/SolverGit.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm
index 16521ba7..38fba0ca 100644
--- a/lib/PublicInbox/SolverGit.pm
+++ b/lib/PublicInbox/SolverGit.pm
@@ -82,7 +82,7 @@ sub solve_existing ($$) {
my ($oid_full, $type, $size) = $git->check($oid_b);
if ($oid_b eq ($oid_full // '') || (defined($type) &&
-- (!$self->{have_hints} || $type eq 'blob'))) {
+ (!$self->{have_hints} || $type eq 'blob'))) {
delete $want->{try_gits};
return [ $git, $oid_full, $type, int($size) ]; # done, success
}
^ permalink raw reply related [relevance 5%]
* [PATCH 14/18] solver: early make hints detection more robust
2022-08-29 9:26 5% [PATCH 00/18] WWW: patch, tree, git glossary Eric Wong
@ 2022-08-29 9:26 7% ` Eric Wong
0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2022-08-29 9:26 UTC (permalink / raw)
To: meta
Hints fields can change, so we'll use a simple boolean rather
than checking a static count. We'll also short-circuit out
reliably regardless of hints when a full OID is given.
---
lib/PublicInbox/SolverGit.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm
index 52dfaf3d..1e96d042 100644
--- a/lib/PublicInbox/SolverGit.pm
+++ b/lib/PublicInbox/SolverGit.pm
@@ -81,9 +81,8 @@ sub solve_existing ($$) {
my $oid_b = $want->{oid_b};
my ($oid_full, $type, $size) = $git->check($oid_b);
- # other than {oid_b, try_gits, try_ibxs}
- my $have_hints = scalar keys %$want > 3;
- if (defined($type) && (!$have_hints || $type eq 'blob')) {
+ if ($oid_b eq ($oid_full // '') || (defined($type) &&
+- (!$self->{have_hints} || $type eq 'blob'))) {
delete $want->{try_gits};
return [ $git, $oid_full, $type, int($size) ]; # done, success
}
@@ -683,6 +682,7 @@ sub solve ($$$$$) {
$self->{seen_oid} = {};
$self->{tot} = 0;
$self->{psgi_env} = $env;
+ $self->{have_hints} = 1 if scalar keys %$hints;
$self->{todo} = [ { %$hints, oid_b => $oid_want } ];
$self->{patches} = []; # [ $di, $di, ... ]
$self->{found} = {}; # { abbr => [ ::Git, oid, type, size, $di ] }
^ permalink raw reply related [relevance 7%]
* [PATCH 00/18] WWW: patch, tree, git glossary
@ 2022-08-29 9:26 5% Eric Wong
2022-08-29 9:26 7% ` [PATCH 14/18] solver: early make hints detection more robust Eric Wong
0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2022-08-29 9:26 UTC (permalink / raw)
To: meta
Raw format-patch and tree HTML output now supported for git
output. I suppose tags can be displayed, too, at some point...
One thing I'm not 100% sure about is adding a git-related
glossary for stuff like trees, commits, etc... It seems
to bloat the page a bit, but it could be useful in slowly
teaching basic git data concepts to beginners.
I suspect folks who have trouble learning git too focused on the
commands rather than the data concepts. (IMHO, the same goes
for learning projects based on studying code vs studying
(DB schemas || struct layouts)).
I snuck one speedup in there, hopefully more to come...
Eric Wong (18):
solver: create tmpdir lazily
viewvcs: share File::Temp::Dir with solver
viewvcs: delay stringification of solver debug log
www: allow html_oneshot to take an array arg
viewvcs: use array for highlighted blob display
viewvcs: add patch download link for single-parent commits
viewvcs: author date links to contemporary messages
view: speed up /$INBOX/ landing page by 0.5-1.0%
treewide: ditch inbox->recent method
view: /$INBOX/: show "messages from $old to $new"
view: cleanups and reuse for {obuf} preparation
www: atom: fix "changed" href to nowhere
www: provide text/help/#search anchor
solver: early make hints detection more robust
viewvcs: add tree view
viewvcs: reduce hash assignments for commit info
viewvcs: add glossary for commit
viewvcs: show "blob $OID" rather than "$OID blob"
lib/PublicInbox/ExtSearch.pm | 1 -
lib/PublicInbox/Inbox.pm | 5 -
lib/PublicInbox/LeiSavedSearch.pm | 1 -
lib/PublicInbox/LeiXSearch.pm | 7 -
lib/PublicInbox/SolverGit.pm | 22 +-
lib/PublicInbox/View.pm | 101 ++++-----
lib/PublicInbox/ViewDiff.pm | 18 +-
lib/PublicInbox/ViewVCS.pm | 341 ++++++++++++++++++++----------
lib/PublicInbox/WWW.pm | 2 +-
lib/PublicInbox/WwwAltId.pm | 6 +-
lib/PublicInbox/WwwAtomStream.pm | 1 +
lib/PublicInbox/WwwStream.pm | 7 +-
lib/PublicInbox/WwwText.pm | 3 +-
t/convert-compact.t | 2 +-
t/indexlevels-mirror.t | 10 +-
t/lei_xsearch.t | 2 +-
t/plack.t | 2 +-
t/replace.t | 4 +-
t/solver_git.t | 3 +-
t/v1-add-remove-add.t | 2 +-
t/v2-add-remove-add.t | 2 +-
21 files changed, 333 insertions(+), 209 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-29 9:26 5% [PATCH 00/18] WWW: patch, tree, git glossary Eric Wong
2022-08-29 9:26 7% ` [PATCH 14/18] solver: early make hints detection more robust Eric Wong
2023-01-24 9:49 [PATCH 00/11] www_coderepo: subjective web stuffs Eric Wong
2023-01-24 9:49 5% ` [PATCH 09/11] solver_git: remove extraneous leading `-' 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).