diff options
author | Eric Wong <e@80x24.org> | 2024-03-10 21:41:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2024-03-10 21:36:15 +0000 |
commit | 1c95e02e19ffc61611dbbfafe64eb13500b44b96 (patch) | |
tree | 9cd5b7f2316e38b45c295aa5a51d84cb2fe545e2 /lib | |
parent | 58bcb92af35425daa6e809712b7c4aa8d7cbe011 (diff) | |
download | public-inbox-1c95e02e19ffc61611dbbfafe64eb13500b44b96.tar.gz |
We must chomp the newline in the branch name if it's set. Reported-by: Rob Herring <robh@kernel.org> Link: https://public-inbox.org/meta/CAL_JsqK7P4gjLPyvzxNEcYmxT4j6Ah5f3Pz1RqDHxmysTg3aEg@mail.gmail.com/ Fixes: 73830410e4336b77 (treewide: use run_qx where appropriate, 2023-10-27)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Import.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm index a951874b..ed34d548 100644 --- a/lib/PublicInbox/Import.pm +++ b/lib/PublicInbox/Import.pm @@ -26,6 +26,7 @@ sub default_branch () { state $default_branch = do { my $h = run_qx([qw(git config --global init.defaultBranch)], { GIT_CONFIG => undef }); + chomp $h; $h eq '' ? 'refs/heads/master' : "refs/heads/$h"; } } |