From: Markus Lehtonen Date: Wed, 17 Dec 2014 15:37:27 +0000 (+0200) Subject: GitRepository.create_tag: use GitArgs class X-Git-Tag: tizen/0.6.22-20150206~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=448b7bc977a25757c2301f3f10a2665d52939b5c;p=tools%2Fgit-buildpackage.git GitRepository.create_tag: use GitArgs class Change-Id: I8ead4dda504152bde4c35ee0c03d6e3295820fd6 Signed-off-by: Markus Lehtonen --- diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 9843d99..7613d8f 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): """