diff options
author | Peter Jones <pjones@redhat.com> | 2019-09-25 10:33:06 -0400 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2022-07-01 10:52:14 +0200 |
commit | bca4e67db36edf467a146b5d208da3b1cfdaaef9 (patch) | |
tree | bbc65b587228fe3c141501ca1ce6172e0dbd0f8c | |
parent | 09e5eac3f00144cbecd12a69390f6db98870f7eb (diff) | |
download | rpm-bca4e67db36edf467a146b5d208da3b1cfdaaef9.tar.gz |
Make "%autosetup -S git" and "%autosetup -S git_am" work on a branch.
This changes the git autosetup handlers so that they do the initial
commit of the expanded tarball on "master", then switch to a branch
"rpm-build" before applying patches. Additionally it sets the
"rpm-build" branch's upstream to "master", so that in the active work
tree where the "rpm-build" is checked out, commands such as
"git rebase -i" automatically have a default behavior that makes sense.
Signed-off-by: Peter Jones <pjones@redhat.com>
(cherry picked from commit 3a6b1d8fbf846d3f1b139d343fdfddebe99ae42b)
-rw-r--r-- | macros.in | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1163,7 +1163,10 @@ package or when debugging this package.\ %{__git} config gc.auto 0\ %{__git} add --force .\ %{__git} commit %{-q} --allow-empty -a\\\ - --author "%{__scm_author}" -m "%{NAME}-%{VERSION} base" + --author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"\ +%{__git} branch rpm-build \ +%{__git} checkout rpm-build \ +%{__git} branch --set-upstream-to=master %__scm_apply_git(qp:m:)\ %{__git} apply --index --reject %{-p:-p%{-p*}} -\ |