summaryrefslogtreecommitdiff
path: root/gbp
diff options
context:
space:
mode:
Diffstat (limited to 'gbp')
-rw-r--r--gbp/command_wrappers.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index e000af1..1439cc5 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -224,7 +224,7 @@ class GitTag(GitCommand):
self.sign_tag = sign_tag
self.keyid = keyid
- def __call__(self, version, msg="Tagging %(version)s"):
+ def __call__(self, version, msg="Tagging %(version)s", commit=None):
self.run_error = 'Couldn\'t tag "%s"' % (version,)
if self.sign_tag:
if self.keyid:
@@ -233,7 +233,10 @@ class GitTag(GitCommand):
sign_opts = [ '-s' ]
else:
sign_opts = []
- GitCommand.__call__(self, sign_opts+[ '-m', msg % locals(), version])
+ cmd = sign_opts + [ '-m', msg % locals(), version]
+ if commit:
+ cmd += [ commit ]
+ GitCommand.__call__(self, cmd)
class GitAdd(GitCommand):