From 789036d60a55bb7251084589dfea6f330c485751 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 17 Dec 2014 17:39:59 +0200 Subject: [PATCH] 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 25fef0a..4d7b24d 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): """ -- 2.7.4