From 1a36070b9e6e8284f3c20c86b169a936fba58abb Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 17 Dec 2014 17:37:27 +0200 Subject: GitRepository.create_tag: use GitArgs class Change-Id: I8ead4dda504152bde4c35ee0c03d6e3295820fd6 Signed-off-by: Markus Lehtonen --- gbp/git/repository.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gbp/git') diff --git a/gbp/git/repository.py b/gbp/git/repository.py index fa3ed520..25fef0aa 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -716,14 +716,14 @@ class GitRepository(object): @param keyid: the GPG keyid used to sign the tag @type keyid: C{str} """ - args = [] - args += [ '-m', msg ] if msg else [] + args = GitArgs() + args.add_true(msg, ['-m', msg]) if sign: - args += [ '-s' ] - args += [ '-u', keyid ] if keyid else [] - args += [ name ] - args += [ commit ] if commit else [] - self._git_command("tag", args) + args.add('-s') + args.add_true(keyid, ['-u', keyid]) + args.add(name) + args.add_true(commit, commit) + self._git_command("tag", args.args) def delete_tag(self, tag): """ -- cgit v1.2.3