8357099
From fdb2de52f24111b64b7e41ab052e8751f0ec3df9 Mon Sep 17 00:00:00 2001
8357099
From: Michal Domonkos <mdomonko@redhat.com>
8357099
Date: Mon, 11 Jul 2022 13:14:49 +0200
8357099
Subject: [PATCH 1/2] Use explicit default branch in %autosetup -S git
8357099
8357099
Commit 3a6b1d8fbf846d3f1b139d343fdfddebe99ae42b assumed "master" as the
8357099
default git branch to track, however the name can be changed globally,
8357099
so make it explicit.
8357099
8357099
Given the choice now, go with "main" as the general trend, e.g:
8357099
https://fedoraproject.org/wiki/Changes/GitRepos-master-to-main
8357099
---
8357099
 macros.in | 4 ++--
8357099
 1 file changed, 2 insertions(+), 2 deletions(-)
8357099
8357099
diff --git a/macros.in b/macros.in
8357099
index 6177e6fec..db5f5b11f 100644
8357099
--- a/macros.in
8357099
+++ b/macros.in
8357099
@@ -1166,7 +1166,7 @@ package or when debugging this package.\
8357099
 
8357099
 # Git
8357099
 %__scm_setup_git(q)\
8357099
-%{__git} init %{-q}\
8357099
+%{__git} init %{-q} --initial-branch=main\
8357099
 %{__git} config user.name "%{__scm_username}"\
8357099
 %{__git} config user.email "%{__scm_usermail}"\
8357099
 %{__git} config gc.auto 0\
8357099
@@ -1175,7 +1175,7 @@ package or when debugging this package.\
8357099
 	--author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"\
8357099
 %{__git} branch rpm-build \
8357099
 %{__git} checkout rpm-build \
8357099
-%{__git} branch --set-upstream-to=master
8357099
+%{__git} branch --set-upstream-to=main
8357099
 
8357099
 %__scm_apply_git(qp:m:)\
8357099
 %{__git} apply --index --reject %{-p:-p%{-p*}} -\
8357099
-- 
8357099
2.36.1
8357099