From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id A67BA1F953; Wed, 27 Oct 2021 04:20:33 +0000 (UTC) Date: Wed, 27 Oct 2021 04:20:33 +0000 From: Eric Wong To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: meta@public-inbox.org Subject: Re: [PATCH] solver_git: support non-master git default branch Message-ID: <20211027042033.GB18609@dcvr> References: <20211026221331.351169-1-thomas@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211026221331.351169-1-thomas@t-8ch.de> List-Id: Thomas Weißschuh wrote: > diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm > index 5d5060f4..f9ce3793 100644 > --- a/lib/PublicInbox/SolverGit.pm > +++ b/lib/PublicInbox/SolverGit.pm > @@ -18,6 +18,7 @@ use PublicInbox::Qspawn; > use PublicInbox::Tmpfile; > use PublicInbox::GitAsyncCat; > use PublicInbox::Eml; > +use PublicInbox::Import; I'm hesitant to add PublicInbox::Import to code used in read-only daemons. > @@ -304,7 +306,7 @@ EOF > close $fh or die "close git/config: $!"; > > open $fh, '>', "$git_dir/HEAD" or die "open git/HEAD: $!"; > - print $fh "ref: refs/heads/master\n" or die "print git/HEAD: $!"; > + print $fh "ref: $default_branch\n" or die "print git/HEAD: $!"; Having a global init.defaultBranch set doesn't seem to affect SolverGit at all, and everything in solver repos is short-lived. Replacing "master" with "s" might be an option for saving a teeny bit of memory traffic, here. *shrug*