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 dict() instead of deepcopy()
suggested by Jelmer
  • Loading branch information
stspdotname committed Jun 25, 2024
commit 2647c582be7258251ad5c0e7442c48023939930f
2 changes: 1 addition & 1 deletion tests/compat/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def run_command(
cmd, path = command.split(" ")
cmd = cmd.split("-", 1)
path = path.replace("'", "")
env = copy.deepcopy(os.environ)
env = dict(os.environ)
if protocol_version is None or protocol_version == 2:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do the inverse here, i.e.

If protocol version is not set, set it to 2.

If protocol version != 0 then set this header.

That prepares us a bit better to future versions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do that. I don't anticipate a new protocol version in the foreseeable future, but it doesn't hurt to handle things that way.

env["GIT_PROTOCOL"] = "version=2"

Expand Down