diff options
author | Peter Jones <pjones@redhat.com> | 2019-09-25 10:33:06 -0400 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2022-03-31 10:07:40 +0300 |
commit | 3a6b1d8fbf846d3f1b139d343fdfddebe99ae42b (patch) | |
tree | 2ed28284a08da00d132a0625dabd14a95a49fa8b | |
parent | fa70eca360e39d61504d1c33079892706f2f8af6 (diff) | |
download | rpm-3a6b1d8fbf846d3f1b139d343fdfddebe99ae42b.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>
-rw-r--r-- | macros.in | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1172,7 +1172,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*}} -\ |