* [PATCH 5/7] repo_atom: translate: account for multiple args
2023-01-28 11:02 5% [PATCH 0/7] www_coderepo updates Eric Wong
@ 2023-01-28 11:02 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2023-01-28 11:02 UTC (permalink / raw)
To: meta
->translate should handle unlimited args, even if we don't
currently use it that way...
---
lib/PublicInbox/RepoAtom.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/PublicInbox/RepoAtom.pm b/lib/PublicInbox/RepoAtom.pm
index 4a013147..44883ab4 100644
--- a/lib/PublicInbox/RepoAtom.pm
+++ b/lib/PublicInbox/RepoAtom.pm
@@ -46,7 +46,7 @@ sub translate {
my $rec = $_[0] // return $self->zflush; # getline
my @out;
my $lbuf = delete($self->{lbuf}) // shift;
- $lbuf .= shift if @_;
+ $lbuf .= shift while @_;
my $is_tag = $self->{-is_tag};
my ($H, $ct, $an, $ae, $at, $s, $bdy);
while ($lbuf =~ s/\A([^\0]+)\0\n//s) {
^ permalink raw reply related [relevance 7%]
* [PATCH 0/7] www_coderepo updates
@ 2023-01-28 11:02 5% Eric Wong
2023-01-28 11:02 7% ` [PATCH 5/7] repo_atom: translate: account for multiple args Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2023-01-28 11:02 UTC (permalink / raw)
To: meta
Not aiming to achieve feature parity with cgit, but
trying to minimize 404s and provide hints/education for
CLI git usage...
And having an Atom feed for just tags (not all commits) can be
nice...
Eric Wong (7):
www_coderepo: tree: quiet and 404 on non-existent refs
www_coderepo: support /$REPO/tags.atom endpoint
www_coderepo: fix snapshot link generation
www_coderepo: reduce utf8::decode calls
repo_atom: translate: account for multiple args
www_coderepo: support $REPO/refs/{heads,tags}/ endpoints
www_coderepo: summary: fix mis-linkification of `...'
lib/PublicInbox/RepoAtom.pm | 64 +++++++++---
lib/PublicInbox/RepoTree.pm | 22 ++++-
lib/PublicInbox/WwwCoderepo.pm | 173 +++++++++++++++++++++++----------
t/solver_git.t | 15 +++
4 files changed, 209 insertions(+), 65 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2023-01-28 11:02 5% [PATCH 0/7] www_coderepo updates Eric Wong
2023-01-28 11:02 7% ` [PATCH 5/7] repo_atom: translate: account for multiple args 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).