FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(commit): accumulate gpgsig continuation lines in linear time by Keerthana-64 · Pull Request #2268 · gitpython-developers/GitPython · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 3 additions & 3 deletions git/objects/commit.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ def _deserialize(self, stream: BytesIO) -> "Commit":
if buf[0:10] == b"encoding ":
self.encoding = buf[buf.find(b" ") + 1 :].decode(self.encoding, "ignore")
elif buf[0:7] == b"gpgsig ":
sig = buf[buf.find(b" ") + 1 :] + b"\n"
sig_lines = [buf[buf.find(b" ") + 1 :] + b"\n"]
is_next_header = False
while True:
sigbuf = readline()
Expand All @@ -895,9 +895,9 @@ def _deserialize(self, stream: BytesIO) -> "Commit":
buf = sigbuf.strip()
is_next_header = True
break
sig += sigbuf[1:]
sig_lines.append(sigbuf[1:])
# END read all signature
self.gpgsig = sig.rstrip(b"\n").decode(self.encoding, "ignore")
self.gpgsig = b"".join(sig_lines).rstrip(b"\n").decode(self.encoding, "ignore")
if is_next_header:
continue
buf = readline().strip()
Expand Down
Loading

Back | FazBrowse Home | New Git URL