summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwist <itsluketwist@gmail.com>2023-04-22 17:54:04 +0100
committerTwist <itsluketwist@gmail.com>2023-04-22 17:54:04 +0100
commited36bd903e1fdf45c53b52dbcb1b2d8444965d98 (patch)
tree3ea2472e9845676110d413cc6427851256737a0c
parentabde3eafd293e8fa2ef2dc22d58ba5d80f1702e9 (diff)
downloadgitpython-ed36bd903e1fdf45c53b52dbcb1b2d8444965d98.tar.gz
Specify encoding in Commit.trailer_list.
-rw-r--r--git/objects/commit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py
index b41a7995..f164becb 100644
--- a/git/objects/commit.py
+++ b/git/objects/commit.py
@@ -372,7 +372,7 @@ class Commit(base.Object, TraversableIterableObj, Diffable, Serializable):
"""
cmd = ["git", "interpret-trailers", "--parse"]
proc: Git.AutoInterrupt = self.repo.git.execute(cmd, as_process=True, istream=PIPE) # type: ignore
- trailer: str = proc.communicate(str(self.message).encode())[0].decode()
+ trailer: str = proc.communicate(str(self.message).encode())[0].decode("utf8")
trailer = trailer.strip()
if not trailer: