Skip to content

Commit 3ec1d6c

Browse files
committed
Add temporary monkeypatch to workaround Dulwich/GitHub issue
1 parent 0c26358 commit 3ec1d6c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

repo_helper_bot/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,18 @@
3434

3535
# TODO: Sign commit
3636
# See https://stackoverflow.com/questions/22968856/what-is-the-file-format-of-a-git-commit-object-data-structure
37+
38+
# Temporary workaround for https://github.com/jelmer/dulwich/issues/1546
39+
40+
41+
def _extract_capabilities(text):
42+
if b"\0" not in text:
43+
return text, []
44+
text, capabilities, *_ = text.rstrip().split(b"\0")
45+
return (text, capabilities.strip().split(b" "))
46+
47+
48+
# 3rd party
49+
import dulwich.protocol
50+
51+
dulwich.protocol.extract_capabilities = _extract_capabilities

0 commit comments

Comments
 (0)