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

Advertise and support side-band-64k when calling receive-pack #1410

Merged
merged 2 commits into from
Mar 12, 2013

Conversation

phkelley
Copy link
Member

We had a customer try pushing with libgit2 to Gitblit, a JGit-based Git server. Even though we send up report-status in the capabilities line, it does not send back a push report. (The push does succeed and the refs are updated on the remote side.) This leads to git_push_finish failing with the error message Early EOF.

It looks like this particular Git server will not send back a push report unless we also advertise support for side-band-64k. If we do advertise support for side-band-64k, then we get back a push report that is not sidebanded at all. This is also weird. If you advertise support for side-band-64k to a real Git server on receive-pack, then you get the push report in sideband channel 1 (data).

This pull request adds support for side-band-64k to the parser for the receive-pack response (the push report), and we start advertising it. So now we support (as does core git) the server sending us the push report sidebanded (or not). That means you can push to a real Git server, or to this Gitblit server, without any trouble.

if (pkt->type == GIT_PKT_FLUSH) {
git_pkt_free(pkt);
/* add_push_report_pkt returns GIT_ITEROVER when it receives a flush */
if (GIT_ITEROVER == error)
Copy link
Member

Choose a reason for hiding this comment

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

Don't wanna be picky, but these reverse comparisons are kind of eww. :)

@vmg
Copy link
Member

vmg commented Mar 12, 2013

This looks very clean. I guess that means y'all did a very good job at abstracting the networking code. It's nice to see sideband support implemented in a few diff lines. Congratulations!

vmg pushed a commit that referenced this pull request Mar 12, 2013
Advertise and support side-band-64k when calling receive-pack
@vmg vmg merged commit c6d7d87 into libgit2:development Mar 12, 2013
phatblat pushed a commit to phatblat/libgit2 that referenced this pull request Sep 13, 2014
Advertise and support side-band-64k when calling receive-pack
@phkelley phkelley deleted the push_sideband branch April 25, 2020 22:31
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.

None yet

2 participants