From 025e1311f8473f65facf8cffeccc11e39466db4a Mon Sep 17 00:00:00 2001 From: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com> Date: Sun, 2 Jul 2023 22:51:41 +1000 Subject: plumbing: packp, A request is not empty if it contains shallows. Fixes #328 Signed-off-by: Arieh Schneier <15041913+AriehSchneier@users.noreply.github.com> --- plumbing/transport/internal/common/common.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plumbing/transport/internal') diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go index 99e0850..5fdf425 100644 --- a/plumbing/transport/internal/common/common.go +++ b/plumbing/transport/internal/common/common.go @@ -232,7 +232,7 @@ func (s *session) handleAdvRefDecodeError(err error) error { // UploadPack performs a request to the server to fetch a packfile. A reader is // returned with the packfile content. The reader must be closed after reading. func (s *session) UploadPack(ctx context.Context, req *packp.UploadPackRequest) (*packp.UploadPackResponse, error) { - if req.IsEmpty() && len(req.Shallows) == 0 { + if req.IsEmpty() { return nil, transport.ErrEmptyUploadPackRequest } -- cgit