Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Progress Callback for Git Push (sideband support) #528

Closed
strin opened this issue Aug 1, 2017 · 3 comments
Closed

Progress Callback for Git Push (sideband support) #528

strin opened this issue Aug 1, 2017 · 3 comments

Comments

@strin
Copy link

strin commented Aug 1, 2017

There is a progress callback for Git Pull. So there should be a callback for Git Push as well.

Reference implementation in python:

http://gitpython.readthedocs.io/en/stable/tutorial.html?highlight=progress

@mcuadros mcuadros changed the title Feature Request: Progress Callback for Git Push Progress Callback for Git Push (sideband support) Aug 1, 2017
@mcuadros
Copy link
Contributor

mcuadros commented Aug 1, 2017

@orirawlings
Copy link
Contributor

Hey @mcuadros,

I've been digging into the code to identify a way to implement this. One of the main challenges I've identified is the mismatch in interface between the packp.ReportStatus.Decode and sideband.Demuxer.Read.

The sideband.Demuxer is implemented with an assumption that the reading client does not care about preserving the pktline format/records, so a sideband.Demuxer.Read simply produces the payload bytes of sideband stream 1. This is great for decoding or storing packfile contents directly, but doesn't work so well when the sideband stream 1 carries other types of record-oriented data.

The packp.ReportStatus.Decode assumes that the reader it is consuming is producing bytes in pktline format. This makes sense because the report status is inherently a record-oriented format, with the overall status in one pktline record, followed by a command status in each subsequent pktline record.

I'm curious if you have any thoughts on how to overcome this. My assumption is that when the side-band or side-band-64k capabilities are enabled, the server will send the report status data on sideband stream 1. I haven't had a chance to confirm this yet.

@orirawlings
Copy link
Contributor

After some more digging, I realized that the report status data is double encoded in the pkt-line format when side-band capabilities are enabled (one level of pkt-line for the various sideband channels and then another level of pkt-line for the payload on sideband channel 1). This allowed me to continue using the existing sideband.Demuxer, without needing to worry about losing the record-oriented structure. See #573 for more info.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants