diff options
author | Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com> | 2023-07-02 22:51:41 +1000 |
---|---|---|
committer | Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com> | 2023-07-02 22:51:41 +1000 |
commit | 025e1311f8473f65facf8cffeccc11e39466db4a (patch) | |
tree | 9eb4595171862dbbf92c88de57bc410bdbc7b12c /plumbing/protocol/packp/uppackreq_test.go | |
parent | 99ccca6bc543f88a18df50763d5fc13808e053e4 (diff) | |
download | go-git-025e1311f8473f65facf8cffeccc11e39466db4a.tar.gz |
plumbing: packp, A request is not empty if it contains shallows. Fixes #328
Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com>
Diffstat (limited to 'plumbing/protocol/packp/uppackreq_test.go')
-rw-r--r-- | plumbing/protocol/packp/uppackreq_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plumbing/protocol/packp/uppackreq_test.go b/plumbing/protocol/packp/uppackreq_test.go index 5a6eb2c..ad38565 100644 --- a/plumbing/protocol/packp/uppackreq_test.go +++ b/plumbing/protocol/packp/uppackreq_test.go @@ -41,6 +41,13 @@ func (s *UploadPackRequestSuite) TestIsEmpty(c *C) { r.Haves = append(r.Haves, plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c")) c.Assert(r.IsEmpty(), Equals, true) + + r = NewUploadPackRequest() + r.Wants = append(r.Wants, plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c")) + r.Haves = append(r.Haves, plumbing.NewHash("d82f291cde9987322c8a0c81a325e1ba6159684c")) + r.Shallows = append(r.Shallows, plumbing.NewHash("2b41ef280fdb67a9b250678686a0c3e03b0a9989")) + + c.Assert(r.IsEmpty(), Equals, false) } type UploadHavesSuite struct{} |