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

Partial fetch using http protocol #216

@ajnavarro

Description

@ajnavarro

Partial fetch is working in file and git protocols, but adding this test into plumbing/transport/test/upload_pack.go file:

func (s *UploadPackSuite) TestUploadPackPartial(c *C) {
	r, err := s.Client.NewUploadPackSession(s.Endpoint, s.EmptyAuth)
	c.Assert(err, IsNil)
	defer func() { c.Assert(r.Close(), IsNil) }()

	req := packp.NewUploadPackRequest()
	req.Wants = append(req.Wants, plumbing.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5"))
	req.Haves = append(req.Haves, plumbing.NewHash("918c48b83bd081e863dbe1b80f8998f058cd8294"))

	reader, err := r.UploadPack(req)
	c.Assert(err, IsNil)

	s.checkObjectNumber(c, reader, 4)
}

It fails when plumbing/transport/http/upload_pack_test.go is executed:

FAIL: <autogenerated>:21: UploadPackSuite.TestUploadPackPartial

/plumbing/transport/test/upload_pack.go:210:
    c.Assert(err, IsNil)
... value *packfile.Error = &packfile.Error{reason:"empty packfile", details:""} ("empty packfile")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions