diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-15 03:51:04 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-15 03:51:04 +0200 |
commit | bcb49927a3897eadc29960032c70da29e26d6b58 (patch) | |
tree | 60025a0a59d15e49c6027b1bfd5d6fee5d5d2438 /clients/common/common.go | |
parent | f6fe29c80d11662a169806dcf413ecdedcb28fa3 (diff) | |
download | go-git-bcb49927a3897eadc29960032c70da29e26d6b58.tar.gz |
Repository.Clone and Remote.Fetch remote, local branches and client: correct header read
Diffstat (limited to 'clients/common/common.go')
-rw-r--r-- | clients/common/common.go | 5 |
1 files changed, 5 insertions, 0 deletions
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") |