We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Implemented a git server with go-git, everything goes well but deleting. It always returns the error empty packfile from rpSession.ReceivePack().
go-git
empty packfile
rpSession.ReceivePack()
The server-side pseudo-code is following:
req := packp.NewReferenceUpdateRequest() _ = req.Decode(r.Body) session, _ := server.NewReceivePackSession(nil, nil) // transport is ignored here defer session.Close() status, err := session.ReceivePack(ctx, req) // <- returns error here _ = status.Encode(w)
I have looked into this issue and the reason is:
req.Packfile = r.Body
session.ReceivePack()
// plumbing/transport/server/server.go if req.Packfile != nil { r := ioutil.NewContextReadCloser(ctx, req.Packfile) if err := s.writePackfile(r); err != nil { s.unpackErr = err s.firstErr = err return s.reportStatus(), err } }
The text was updated successfully, but these errors were encountered:
There should be no packfile in a deleting request.
Sorry, something went wrong.
No branches or pull requests
Implemented a git server with
go-git
, everything goes well but deleting. It always returns the errorempty packfile
fromrpSession.ReceivePack()
.The server-side pseudo-code is following:
I have looked into this issue and the reason is:
req.Packfile = r.Body
when decoding the r.Bodysession.ReceivePack()
function, it tries to write Packfile but fails to read HEAD, as shown below:The text was updated successfully, but these errors were encountered: