diff options
-rw-r--r-- | git/refs/tag.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git/refs/tag.py b/git/refs/tag.py index 3aec99fe..4cbea5ea 100644 --- a/git/refs/tag.py +++ b/git/refs/tag.py @@ -98,7 +98,9 @@ class TagReference(Reference): Additional keyword arguments to be passed to git-tag :return: A new TagReference""" - args = (path, reference) + if 'ref' in kwargs and kwargs['ref']: + reference = kwargs['ref'] + if logmsg: kwargs['m'] = logmsg elif 'message' in kwargs and kwargs['message']: @@ -107,6 +109,8 @@ class TagReference(Reference): if force: kwargs['f'] = True + args = (path, reference) + repo.git.tag(*args, **kwargs) return TagReference(repo, "%s/%s" % (cls._common_path_default, path)) |