Skip to content

Commit 275c37f

Browse files
ruudaByron
authored andcommitted
Fix bug in TagReference.create
When passing the "message" kwarg, this would add a -m command-line flag without removing --message, and the message would be duplicated. Avoid that by deleting "message" from the command line.
1 parent f6523c1 commit 275c37f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

git/refs/tag.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ def create(
113113
if "ref" in kwargs and kwargs["ref"]:
114114
reference = kwargs["ref"]
115115

116+
if "message" in kwargs and kwargs["message"]:
117+
kwargs["m"] = kwargs["message"]
118+
del kwargs["message"]
119+
116120
if logmsg:
117121
kwargs["m"] = logmsg
118-
elif "message" in kwargs and kwargs["message"]:
119-
kwargs["m"] = kwargs["message"]
120122

121123
if force:
122124
kwargs["f"] = True

0 commit comments

Comments
 (0)