From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id AB2EC1F626 for ; Wed, 15 Feb 2023 04:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1676436545; bh=eAKFVrofeMn9g1JTSjX8lA0cFuKLmv+KfXM3g3EizCE=; h=Date:From:To:Subject:References:In-Reply-To:From; b=LWP3L0iIrUz+pYagIIhWCiTFLdYstrQDT8t1XcDh8bvwkqP3DKfzCCGRp76qVaAlt V+CLMKZNNk4Ee9zObFqQzN3DzLuMWanQGJKnejBiRU1yczc3gbDYmKdHJ/Vn6XLw/9 5ts2eKomIherISb3WRHxVd5tg78Q/qAHsRXoBFjg= Date: Wed, 15 Feb 2023 04:49:04 +0000 From: Eric Wong To: meta@public-inbox.org Subject: Re: [PATCH 2/2] www_coderepo: handle unborn/dead branches in summary Message-ID: <20230215044904.M356403@dcvr> References: <20230214131739.2978030-1-e@80x24.org> <20230214131739.2978030-3-e@80x24.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230214131739.2978030-3-e@80x24.org> List-Id: Eric Wong 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.