From bcb49927a3897eadc29960032c70da29e26d6b58 Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Mon, 15 Aug 2016 03:51:04 +0200 Subject: Repository.Clone and Remote.Fetch remote, local branches and client: correct header read --- clients/common/common.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clients/common/common.go') diff --git a/clients/common/common.go b/clients/common/common.go index b1a0fe1..c8dc7de 100644 --- a/clients/common/common.go +++ b/clients/common/common.go @@ -287,6 +287,7 @@ func (r *GitUploadPackInfo) Bytes() []byte { type GitUploadPackRequest struct { Wants []core.Hash Haves []core.Hash + Depth int } func (r *GitUploadPackRequest) Want(h ...core.Hash) { @@ -312,6 +313,10 @@ func (r *GitUploadPackRequest) Reader() *strings.Reader { e.AddLine(fmt.Sprintf("have %s", have)) } + if r.Depth != 0 { + e.AddLine(fmt.Sprintf("deepen %d", r.Depth)) + } + e.AddFlush() e.AddLine("done") -- cgit