diff options
author | Santiago M. Mola <santi@mola.io> | 2016-11-25 15:48:20 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-25 15:48:20 +0100 |
commit | f9adb3565b36ba1573102f954d0ee916009efac2 (patch) | |
tree | abc5b98e61b5851a985a215f7265ce2e9eb131f7 /plumbing/format/packp/ulreq/ulreq.go | |
parent | c1e0932c6cbcc55a78f338d437b9f13d89f33552 (diff) | |
download | go-git-f9adb3565b36ba1573102f954d0ee916009efac2.tar.gz |
move: format/packp -> protocol/packp (#141)
* move: format/packp -> protocol/packp
* format/packp -> protocol/packp
* format/packp/pktline -> format/pktline.
* move: protocol/packp/ulreq/* -> protocol/packp/*
* protocol/packp: rename UlReq types to make them unique.
* * protocol/packp: namespace UlReq encoder.
* protocol/packp: namespace UlReq decoder.
* protocol/packp: fix example names
* move: protocol/packp/advrefs/* -> protocol/packp/*
* further ulreq namespacing
* protocol/packp: namespace AdvRefs types.
Diffstat (limited to 'plumbing/format/packp/ulreq/ulreq.go')
-rw-r--r-- | plumbing/format/packp/ulreq/ulreq.go | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/plumbing/format/packp/ulreq/ulreq.go b/plumbing/format/packp/ulreq/ulreq.go deleted file mode 100644 index d2cc7c0..0000000 --- a/plumbing/format/packp/ulreq/ulreq.go +++ /dev/null @@ -1,56 +0,0 @@ -// Package ulreq implements encoding and decoding upload-request -// messages from a git-upload-pack command. -package ulreq - -import ( - "time" - - "gopkg.in/src-d/go-git.v4/plumbing" - "gopkg.in/src-d/go-git.v4/plumbing/format/packp" -) - -// UlReq values represent the information transmitted on a -// upload-request message. Values from this type are not zero-value -// safe, use the New function instead. -type UlReq struct { - Capabilities *packp.Capabilities - Wants []plumbing.Hash - Shallows []plumbing.Hash - Depth Depth -} - -// Depth values stores the desired depth of the requested packfile: see -// DepthCommit, DepthSince and DepthReference. -type Depth interface { - isDepth() -} - -// DepthCommits values stores the maximum number of requested commits in -// the packfile. Zero means infinite. A negative value will have -// undefined consecuences. -type DepthCommits int - -func (d DepthCommits) isDepth() {} - -// DepthSince values requests only commits newer than the specified time. -type DepthSince time.Time - -func (d DepthSince) isDepth() {} - -// DepthReference requests only commits not to found in the specified reference. -type DepthReference string - -func (d DepthReference) isDepth() {} - -// New returns a pointer to a new UlReq value, ready to be used. It has -// no capabilities, wants or shallows and an infinite depth. Please -// note that to encode an upload-request it has to have at least one -// wanted hash. -func New() *UlReq { - return &UlReq{ - Capabilities: packp.NewCapabilities(), - Wants: []plumbing.Hash{}, - Shallows: []plumbing.Hash{}, - Depth: DepthCommits(0), - } -} |