Don't fail if GPG signing is configured by default. All references.

This commit is contained in:
Pedro Algarvio 2018-12-28 20:06:52 +00:00
parent 7afb2944b2
commit 28c97a95cd
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF
10 changed files with 60 additions and 50 deletions

View file

@ -133,3 +133,18 @@ def cwd(path):
yield
finally:
os.chdir(original_cwd)
def git_commit(msg, *_args, **kwargs):
args = ['git']
config = kwargs.pop('config', None)
if config is not None:
args.extend(['-C', config])
args.append('commit')
if msg is not None:
args.extend(['-m', msg])
if '--allow-empty' not in _args:
args.append('--allow-empty')
if '--no-gpg-sign' not in _args:
args.append('--no-gpg-sign')
return cmd_output(*(tuple(args) + tuple(_args)), **kwargs)