summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDr. Jens Harbott <harbott@osism.tech>2022-01-03 16:45:06 +0100
committerJeremy Stanley <fungi@yuggoth.org>2022-04-11 16:59:59 +0000
commit053b6294722165faa1259321781e36670e3cceee (patch)
tree005f8c159b6c69d4292dbaa4b5d0c51fa106d391
parentf1851f732a9936b2c2a7236d9d21aec4920e047e (diff)
downloadgit-review-053b6294722165faa1259321781e36670e3cceee.tar.gz
Fix submitting signed patches
When a commit is signed and the git config contains the setting log.ShowSignature=True, even the "--oneline" git log output for it will include multiple lines (the output from gpg verifying the signature), thus fooling us into assuming that multiple commits are to be submitted. Override the option to make sure we always get one line per commit only. Signed-off-by: Dr. Jens Harbott <harbott@osism.tech> Change-Id: Id4528209f1cd500afd06e2e61eb5689022251118
-rw-r--r--git_review/cmd.py4
-rw-r--r--releasenotes/notes/fix-show-signatures-5e9c12d43b7051f0.yaml10
2 files changed, 12 insertions, 2 deletions
diff --git a/git_review/cmd.py b/git_review/cmd.py
index 15f3121..b9879c5 100644
--- a/git_review/cmd.py
+++ b/git_review/cmd.py
@@ -984,8 +984,8 @@ def assert_one_change(remote, branch, yes, have_hook):
use_color = "--color=always"
else:
use_color = "--color=never"
- cmd = ("git log %s --decorate --oneline HEAD --not --remotes=%s" % (
- use_color, remote))
+ cmd = ("git log %s --decorate --oneline --no-show-signature "
+ "HEAD --not --remotes=%s" % (use_color, remote))
(status, output) = run_command_status(cmd)
if status != 0:
print("Had trouble running %s" % cmd)
diff --git a/releasenotes/notes/fix-show-signatures-5e9c12d43b7051f0.yaml b/releasenotes/notes/fix-show-signatures-5e9c12d43b7051f0.yaml
new file mode 100644
index 0000000..da26d99
--- /dev/null
+++ b/releasenotes/notes/fix-show-signatures-5e9c12d43b7051f0.yaml
@@ -0,0 +1,10 @@
+---
+fixes:
+ - |
+ Git's log.ShowSignature option is now supported. Previously,
+ setting it would confuse git-review into thinking there were
+ twice as many changes to push.
+upgrade:
+ - |
+ Git 2.10.0 or later is required as git-review now needs the
+ ``--no-show-signature`` option for git-log.