aboutsummaryrefslogtreecommitdiffstats
path: root/common_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-11-01 01:38:35 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-11-01 01:38:35 +0100
commit6badbeb07eb5cc0b1be201f5d8cc8193e30bcf54 (patch)
tree73f18bf34ef70fd747c90a70fe1835dd39094af2 /common_test.go
parentc6349552c1c54ea114b92ae23fc840f68f6551f4 (diff)
downloadgo-git-6badbeb07eb5cc0b1be201f5d8cc8193e30bcf54.tar.gz
clients: capabilities improvement
Diffstat (limited to 'common_test.go')
-rw-r--r--common_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/common_test.go b/common_test.go
index d8647ff..1716813 100644
--- a/common_test.go
+++ b/common_test.go
@@ -2,9 +2,7 @@ package git
import (
"io"
- "net/url"
"os"
- "strings"
"testing"
. "gopkg.in/check.v1"
@@ -23,11 +21,11 @@ func (s *MockGitUploadPackService) Connect(url common.Endpoint) error {
func (s *MockGitUploadPackService) Info() (*common.GitUploadPackInfo, error) {
hash := core.NewHash("6ecf0ef2c2dffb796033e5a02219af86ec6584e5")
- line := "6ecf0ef2c2dffb796033e5a02219af86ec6584e5 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2:2.4.8~dbussink-fix-enterprise-tokens-compilation-1167-gc7006cf"
- values, _ := url.ParseQuery(strings.Replace(line, " ", "&", -1))
+ cap := common.NewCapabilities()
+ cap.Decode("6ecf0ef2c2dffb796033e5a02219af86ec6584e5 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done symref=HEAD:refs/heads/master agent=git/2:2.4.8~dbussink-fix-enterprise-tokens-compilation-1167-gc7006cf")
return &common.GitUploadPackInfo{
- Capabilities: common.Capabilities(values),
+ Capabilities: cap,
Head: "refs/heads/master",
Refs: map[string]core.Hash{"refs/heads/master": hash},
}, nil