Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add initial support for Git protocol v2 #1244

Merged
merged 12 commits into from
Jun 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use None to represent unspecified optional parameters; suggested by J…
…elmer
  • Loading branch information
stspdotname committed Jun 25, 2024
commit 26344f80565be46e3d97014f055d027ce72b5def
4 changes: 3 additions & 1 deletion dulwich/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ def _handle_upload_pack_head(
wants,
can_read,
depth,
protocol_version=0,
protocol_version=None,
):
"""Handle the head of a 'git-upload-pack' request.

Expand All @@ -561,6 +561,8 @@ def _handle_upload_pack_head(
"""
assert isinstance(wants, list) and isinstance(wants[0], bytes)
wantcmd = COMMAND_WANT + b" " + wants[0]
if protocol_version is None:
protocol_version = 0
if protocol_version != 2:
wantcmd += b" " + b" ".join(sorted(capabilities))
wantcmd += b"\n"
Expand Down