diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-11-29 15:11:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 15:11:00 +0100 |
commit | ef1a0579fbc6aac510313ce073d1dd8fc8a9202b (patch) | |
tree | 6d41484c70cef0ec6b7582e2ac15b9daccf0e54e /plumbing/protocol/packp/common.go | |
parent | 47007c70c5a696472576a522cd0e265a777f97a8 (diff) | |
download | go-git-ef1a0579fbc6aac510313ce073d1dd8fc8a9202b.tar.gz |
protocol/packp: capabilities new Capability entity and List struct, test improvements (#144)
* protocol/pakp: capabilities new Capability entity and List struct, test improvements
* etc: example cloud-config file
* removing sorting from List.String
Diffstat (limited to 'plumbing/protocol/packp/common.go')
-rw-r--r-- | plumbing/protocol/packp/common.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/plumbing/protocol/packp/common.go b/plumbing/protocol/packp/common.go index c4b44f7..3d7786b 100644 --- a/plumbing/protocol/packp/common.go +++ b/plumbing/protocol/packp/common.go @@ -1,7 +1,5 @@ package packp -import "bytes" - type stateFn func() stateFn const ( @@ -31,15 +29,3 @@ var ( deepenSince = []byte("deepen-since ") deepenReference = []byte("deepen-not ") ) - -// Capabilities are a single string or a name=value. -// Even though we are only going to read at moust 1 value, we return -// a slice of values, as Capability.Add receives that. -func readCapability(data []byte) (name string, values []string) { - pair := bytes.SplitN(data, []byte{'='}, 2) - if len(pair) == 2 { - values = append(values, string(pair[1])) - } - - return string(pair[0]), values -} |