unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: Re: [PATCH 2/2] www_coderepo: handle unborn/dead branches in summary
Date: Wed, 15 Feb 2023 04:49:04 +0000	[thread overview]
Message-ID: <20230215044904.M356403@dcvr> (raw)
In-Reply-To: <20230214131739.2978030-3-e@80x24.org>

Eric Wong <e@80x24.org> wrote:
> diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm
> index 8a490b6c..629fad09 100644
> --- a/lib/PublicInbox/WwwCoderepo.pm
> +++ b/lib/PublicInbox/WwwCoderepo.pm
> @@ -218,7 +217,8 @@ sub summary {
>  		qq(git log -$nl --pretty=format:'%d %H %h %cs %s' "\$@" --));
>  	push @cmd, '--', $tip if defined($tip);

Looks like I need to squash this in for FreeBSD /bin/sh, too:

diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm
index 629fad09..52ab6e48 100644
--- a/lib/PublicInbox/WwwCoderepo.pm
+++ b/lib/PublicInbox/WwwCoderepo.pm
@@ -215,7 +215,7 @@ sub summary {
 		"$EACH_REF --count=$nb refs/heads; echo && " .
 		"$EACH_REF --count=$nt refs/tags; echo && " .
 		qq(git log -$nl --pretty=format:'%d %H %h %cs %s' "\$@" --));
-	push @cmd, '--', $tip if defined($tip);
+	push @cmd, 'git', $tip if defined($tip);
 	my $qsp = PublicInbox::Qspawn->new(\@cmd,
 		{ GIT_DIR => $ctx->{git}->{git_dir} },
 		{ quiet => 1, 2 => $self->{log_fh} });

dash (on Debian) can handle the '--' as the command-name,
but /bin/sh seems to try interpreting it as a CLI switch.

      reply	other threads:[~2023-02-15  4:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 13:17 [PATCH 0/2] www_coderepo: graceful dead branch handling Eric Wong
2023-02-14 13:17 ` [PATCH 1/2] www_coderepo: quiet 404s on Atom feeds for dead branches Eric Wong
2023-02-14 13:17 ` [PATCH 2/2] www_coderepo: handle unborn/dead branches in summary Eric Wong
2023-02-15  4:49   ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230215044904.M356403@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).