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

fix(up): divide the encoding of UploadPackReponse into two steps #1073

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luckjay
Copy link

@luckjay luckjay commented Apr 8, 2024

This PR is to divide the encoding of UploadPackReponse into two steps. So the user can use two different writers for pkt-lines and packfiles when integrating with side-band enabled clients, for example, isomorphic-git.

For example, the pseudo-code is like the following:

var w io.writer
if err = response.EncodePacketLines(w); err != nil {
	return error
}

muxer := sideband.NewMuxer(sideband.Sideband, w)
if err = response.EncodePackfiles(muxer); err != nil {
	return err
}

return nil

@luckjay
Copy link
Author

luckjay commented Apr 15, 2024

@pjbgf could you review this pr, thanks!

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