aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2019-02-23 20:03:41 -0500
committerGuido Günther <agx@sigxcpu.org>2019-02-24 12:34:53 +0100
commit34b9da1de902be0f4e43fd99d0fcb7e278bedbd9 (patch)
treeba74f854385d23b4b42a7c2e1e1f2faf8a3d5e06
parentd3f67c8e9e0cc542eab2e8240f1a1a6288c55ddf (diff)
Disable PGP signatures when retrieving list of commits
gbp dch errors out with the following output if the "log.showSignature" git config is enabled: $ gbp dch --verbose gbp:debug: ['git', 'rev-parse', '--show-cdup'] gbp:debug: ['git', 'rev-parse', '--is-bare-repository'] gbp:debug: ['git', 'rev-parse', '--git-dir'] gbp:debug: ['git', 'symbolic-ref', 'HEAD'] gbp:debug: ['git', 'show-ref', 'refs/heads/master'] gbp:debug: ['git', 'tag', '-l', 'debian/2.7.3-2'] gbp:debug: ['git', 'tag', '-l', 'debian/2.7.3-2'] gbp:debug: ['git', 'log', '--pretty=format:%H', '-1', '--', 'debian/changelog'] gbp:info: Changelog last touched at 'gpg: Signature made Fri 01 Feb 2019 03:56:19 PM EST' gbp:debug: ['git', 'log', '--pretty=format:%H', 'gpg: Signature made Fri 01 Feb 2019 03:56:19 PM EST..HEAD', '--no-merges', '--'] fatal: bad revision 'gpg: Signature made Fri 01 Feb 2019 03:56:19 PM EST..HEAD' gbp:error: Error getting commits gpg: Signature made Fri 01 Feb 2019 03:56:19 PM EST..HEAD This is caused by gbp dch receiving unexpected output for the PGP signatures and trying to use this unexpected output. To avoid any surprises, let's disable signatures being output when we list commits. Also, when collecting a shortlog-like output from commit objects, the same unexpected PGP signature output is sprayed all over the changelog. We'll avoid this by also disable showing signatures when showing each commit's first line. Closes: #923087
-rw-r--r--gbp/git/repository.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index a44c71e1..dfc8e556 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1613,7 +1613,7 @@ class GitRepository(object):
merge commit
@type first_parent: C{bool}
"""
- args = GitArgs('--pretty=format:%H')
+ args = GitArgs('--pretty=format:%H', '--no-show-signature')
args.add_true(num, '-%d' % num)
args.add_true(first_parent, '--first-parent')
if since:
@@ -1694,7 +1694,7 @@ class GitRepository(object):
commit_sha1 = self.rev_parse("%s^0" % commitish)
args = GitArgs('--pretty=format:%an%x00%ae%x00%ad%x00%cn%x00%ce%x00%cd%x00%s%x00%f%x00%b%x00',
'-z', '--date=raw', '--no-renames', '--name-status',
- commit_sha1)
+ '--no-show-signature', commit_sha1)
out, err, ret = self._git_inout('show', args.args)
if ret:
raise GitRepositoryError("Unable to retrieve commit info for %s"