summaryrefslogtreecommitdiff
path: root/gbp/git
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2014-12-17 17:39:59 +0200
committerJun Wang <junbill.wang@samsung.com>2016-01-28 02:36:50 +0800
commit789036d60a55bb7251084589dfea6f330c485751 (patch)
tree7c90d4c29c01507ec49aa4f71ab4451104e64370 /gbp/git
parent1a36070b9e6e8284f3c20c86b169a936fba58abb (diff)
downloadgit-buildpackage-789036d60a55bb7251084589dfea6f330c485751.tar.gz
git-buildpackage-789036d60a55bb7251084589dfea6f330c485751.tar.bz2
git-buildpackage-789036d60a55bb7251084589dfea6f330c485751.zip
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 <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 25fef0aa..4d7b24dc 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):
"""