From: "Thomas Weißschuh" <thomas@t-8ch.de>
To: meta@public-inbox.org
Cc: "Thomas Weißschuh" <thomas@t-8ch.de>
Subject: [PATCH] solver_git: support non-master git default branch
Date: Wed, 27 Oct 2021 00:13:31 +0200 [thread overview]
Message-ID: <20211026221331.351169-1-thomas@t-8ch.de> (raw)
---
lib/PublicInbox/SolverGit.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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;
use URI::Escape qw(uri_escape_utf8);
# POSIX requires _POSIX_ARG_MAX >= 4096, and xargs is required to
@@ -26,6 +27,7 @@ use URI::Escape qw(uri_escape_utf8);
use POSIX qw(sysconf _SC_ARG_MAX);
my $ARG_SIZE_MAX = (sysconf(_SC_ARG_MAX) || 4096) - 2048;
my $OID_MIN = 7;
+my $default_branch = PublicInbox::Import::default_branch;
# By default, "git format-patch" generates filenames with a four-digit
# prefix, so that means 9999 patch series are OK, right? :>
@@ -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: $!";
close $fh or die "close git/HEAD: $!";
my $f = 'objects/info/alternates';
base-commit: e7d9df936d071b4a9b72d2e6096ddf1e90c1bc05
--
2.33.1
next reply other threads:[~2021-10-26 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 22:13 Thomas Weißschuh [this message]
2021-10-27 4:20 ` [PATCH] solver_git: support non-master git default branch Eric Wong
2021-10-27 4:59 ` Thomas Weißschuh
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=20211026221331.351169-1-thomas@t-8ch.de \
--to=thomas@t-8ch.de \
--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.
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).