Skip to content

refactor transport: plumbing: transport, support multi-ack and multi-ack-detailed capabilities (3/5) #1338

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

Merged
merged 2 commits into from
Jan 4, 2025

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Dec 31, 2024

This adds support for multi-ack and multi-ack-detailed capabilities in
the transport package. The support includes both the client and server.

This works by properly implementing the negotiation algorithm where the client and server can send/receive multiple upload-haves and server-response requests. The implementation follows canonical git sending 32 have lines per compute step to find the optimal packfile.

Related: 2ebd65f
Related: #1204

Based on: #1303 and #1337

@aymanbagabas aymanbagabas changed the title plumbing: transport, support multi-ack and multi-ack-detailed capabilities refactor transport: plumbing: transport, support multi-ack and multi-ack-detailed capabilities (3/5) Dec 31, 2024
@aymanbagabas aymanbagabas force-pushed the v6-transport-multiack branch 2 times, most recently from b062e53 to 90bdb93 Compare December 31, 2024 17:49
@aymanbagabas aymanbagabas changed the base branch from v6-exp to v6-transport January 2, 2025 14:40
…ities

This adds support for multi-ack and multi-ack-detailed capabilities in
the transport package. The support includes both the client and server.

Related: go-git@2ebd65f
Related: go-git#1204
@aymanbagabas aymanbagabas force-pushed the v6-transport-multiack branch from 90bdb93 to 14eabbd Compare January 2, 2025 15:49
@aymanbagabas aymanbagabas marked this pull request as ready for review January 2, 2025 15:49
r.ACKs = append(r.ACKs, h)
return nil
var ack ACK
// TODO: Dynamic hash size and sha256 support
Copy link
Member

Choose a reason for hiding this comment

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

Again, let's pick up on a future PR, but for packfile this is based on an "option" as the packfile can do SHA1 or SHA1 and SHA256 hashes. Here, I believe it would need to be either/or and would be based off the object format.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, we will need to support the object-format capability. I think here, instead of hard-coding the hash lengths, we need to be more lenient and just treat whatever argument as a hash.

Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
@aymanbagabas aymanbagabas requested a review from pjbgf January 3, 2025 10:23
@pjbgf pjbgf merged commit fc083c5 into go-git:v6-transport Jan 4, 2025
2 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants