From 42c179873afdc4ea9634b0e0fbaf391298880998 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 25 May 2023 07:01:32 +0000 Subject: automatic import of rpkg --- ...Allow-empty-commits-when-uses_rpmautospec.patch | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 0017-Allow-empty-commits-when-uses_rpmautospec.patch (limited to '0017-Allow-empty-commits-when-uses_rpmautospec.patch') diff --git a/0017-Allow-empty-commits-when-uses_rpmautospec.patch b/0017-Allow-empty-commits-when-uses_rpmautospec.patch new file mode 100644 index 0000000..448cbc9 --- /dev/null +++ b/0017-Allow-empty-commits-when-uses_rpmautospec.patch @@ -0,0 +1,35 @@ +From d2c63c32306732695b7fe5f9dda3deecb7899f4f Mon Sep 17 00:00:00 2001 +From: Jiri Kyjovsky +Date: Sat, 15 Apr 2023 13:46:21 +0200 +Subject: [PATCH 4/6] Allow empty commits when `uses_rpmautospec` + +To avoid situations where the command `commit` by default does +commit when no change in repo is present. + +Fixes: #677 +JIRA: RHELCMP-11489 +Merges: https://pagure.io/rpkg/pull-request/688 + +Signed-off-by: Jiri Kyjovsky +--- + pyrpkg/__init__.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py +index 0b9a869..187796e 100644 +--- a/pyrpkg/__init__.py ++++ b/pyrpkg/__init__.py +@@ -1867,7 +1867,9 @@ class Commands(object): + + # construct the git command + # We do this via subprocess because the git module is terrible. +- cmd = ['git', 'commit', '--allow-empty'] ++ cmd = ['git', 'commit'] ++ if not self.is_retired() and self.uses_rpmautospec: ++ cmd.append('--allow-empty') + if signoff: + cmd.append('-s') + if self.quiet: +-- +2.39.2 + -- cgit v1.2.3