diff options
| author | Ruud van Asseldonk <ruud@chorus.one> | 2022-06-24 18:31:43 +0200 |
|---|---|---|
| committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2022-06-25 10:27:13 +0800 |
| commit | 275c37f685504b3892a79a8f5d039ad4dafd50b3 (patch) | |
| tree | fd38cf0303a15f8c0670d02d8dc0f8549a0a1ee5 | |
| parent | f6523c15af935066b813c385b3cd8ff010001c01 (diff) | |
| download | gitpython-275c37f685504b3892a79a8f5d039ad4dafd50b3.tar.gz | |
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.
| -rw-r--r-- | git/refs/tag.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git/refs/tag.py b/git/refs/tag.py index 0295b54d..d32d91bc 100644 --- a/git/refs/tag.py +++ b/git/refs/tag.py @@ -113,10 +113,12 @@ class TagReference(Reference): if "ref" in kwargs and kwargs["ref"]: reference = kwargs["ref"] + if "message" in kwargs and kwargs["message"]: + kwargs["m"] = kwargs["message"] + del kwargs["message"] + if logmsg: kwargs["m"] = logmsg - elif "message" in kwargs and kwargs["message"]: - kwargs["m"] = kwargs["message"] if force: kwargs["f"] = True |
