From ac095bb12c4d29722b60ba9f20590fa7cfa6bc7d Mon Sep 17 00:00:00 2001 From: Máximo Cuadros Date: Tue, 8 Nov 2016 23:46:38 +0100 Subject: new plumbing package (#118) * plumbing: now core was renamed to core, and formats and clients moved inside --- formats/packp/ulreq/ulreq.go | 56 -------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 formats/packp/ulreq/ulreq.go (limited to 'formats/packp/ulreq/ulreq.go') diff --git a/formats/packp/ulreq/ulreq.go b/formats/packp/ulreq/ulreq.go deleted file mode 100644 index e47450a..0000000 --- a/formats/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/core" - "gopkg.in/src-d/go-git.v4/formats/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 []core.Hash - Shallows []core.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: []core.Hash{}, - Shallows: []core.Hash{}, - Depth: DepthCommits(0), - } -} -- cgit