From 04861fff93001d149c4bf69f475c9aa35a357b5d Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 17 Dec 2014 17:39:59 +0200 Subject: GitRepository.create_tag: add 'annotate' argument For forcing the creation of annotated tags. Causes the an editor to be spawned if no message is given. Change-Id: I8ec7e195cf7ae997606af1d887f04e84a14b2abc Signed-off-by: Markus Lehtonen --- gbp/git/repository.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 7613d8f3..20251a00 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -700,7 +700,8 @@ class GitRepository(object): #{ Tags - def create_tag(self, name, msg=None, commit=None, sign=False, keyid=None): + def create_tag(self, name, msg=None, commit=None, sign=False, keyid=None, + annotate=False): """ Create a new tag. @@ -715,15 +716,18 @@ class GitRepository(object): @type sign: C{bool} @param keyid: the GPG keyid used to sign the tag @type keyid: C{str} + @param annotate: Create an annotated tag + @type annotate: C{bool} """ args = GitArgs() args.add_true(msg, ['-m', msg]) if sign: args.add('-s') args.add_true(keyid, ['-u', keyid]) + args.add_true(annotate, '-a') args.add(name) args.add_true(commit, commit) - self._git_command("tag", args.args) + self._git_command("tag", args.args, interactive=True) def delete_tag(self, tag): """ -- cgit v1.2.3