From 9488c59834f6a2591910b7b360721cec2c16c548 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 24 Jul 2017 10:51:01 +0200 Subject: config: multiple values in RemoteConfig (URLs and Fetch) * Change `URL string` to `URL []string` in `RemoteConfig`, since git allows multiple URLs per remote. See: http://marc.info/?l=git&m=116231242118202&w=2 * Fix marshalling of multiple fetch refspecs. --- storage/filesystem/config_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'storage/filesystem') diff --git a/storage/filesystem/config_test.go b/storage/filesystem/config_test.go index 1b812e6..4226b33 100644 --- a/storage/filesystem/config_test.go +++ b/storage/filesystem/config_test.go @@ -5,6 +5,7 @@ import ( "os" "github.com/src-d/go-git-fixtures" + "gopkg.in/src-d/go-git.v4/config" "gopkg.in/src-d/go-git.v4/storage/filesystem/internal/dotgit" . "gopkg.in/check.v1" @@ -39,9 +40,8 @@ func (s *ConfigSuite) TestRemotes(c *C) { c.Assert(remotes, HasLen, 1) remote := remotes["origin"] c.Assert(remote.Name, Equals, "origin") - c.Assert(remote.URL, Equals, "https://github.com/git-fixtures/basic") - c.Assert(remote.Fetch, HasLen, 1) - c.Assert(remote.Fetch[0].String(), Equals, "+refs/heads/*:refs/remotes/origin/*") + c.Assert(remote.URLs, DeepEquals, []string{"https://github.com/git-fixtures/basic"}) + c.Assert(remote.Fetch, DeepEquals, []config.RefSpec{config.RefSpec("+refs/heads/*:refs/remotes/origin/*")}) } func (s *ConfigSuite) TearDownTest(c *C) { -- cgit