aboutsummaryrefslogtreecommitdiffstats
path: root/worktree_test.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-07-24 10:51:01 +0200
committerSantiago M. Mola <santi@mola.io>2017-08-01 13:01:54 +0200
commit9488c59834f6a2591910b7b360721cec2c16c548 (patch)
treefea051f6cf08a62aad12e32b2240aa837be22628 /worktree_test.go
parent7b08a3005480a50f0f4290aff8f3702085d5e30d (diff)
downloadgo-git-9488c59834f6a2591910b7b360721cec2c16c548.tar.gz
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.
Diffstat (limited to 'worktree_test.go')
-rw-r--r--worktree_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/worktree_test.go b/worktree_test.go
index 10774a4..c14d3bc 100644
--- a/worktree_test.go
+++ b/worktree_test.go
@@ -37,7 +37,7 @@ func (s *WorktreeSuite) TestPullCheckout(c *C) {
r, _ := Init(memory.NewStorage(), fs)
r.CreateRemote(&config.RemoteConfig{
Name: DefaultRemoteName,
- URL: s.GetBasicLocalRepositoryURL(),
+ URLs: []string{s.GetBasicLocalRepositoryURL()},
})
w, err := r.Worktree()
@@ -115,7 +115,7 @@ func (s *WorktreeSuite) TestPullUpdateReferencesIfNeeded(c *C) {
r, _ := Init(memory.NewStorage(), memfs.New())
r.CreateRemote(&config.RemoteConfig{
Name: DefaultRemoteName,
- URL: s.GetBasicLocalRepositoryURL(),
+ URLs: []string{s.GetBasicLocalRepositoryURL()},
})
err := r.Fetch(&FetchOptions{})
@@ -173,7 +173,7 @@ func (s *WorktreeSuite) TestPullProgress(c *C) {
r.CreateRemote(&config.RemoteConfig{
Name: DefaultRemoteName,
- URL: s.GetBasicLocalRepositoryURL(),
+ URLs: []string{s.GetBasicLocalRepositoryURL()},
})
w, err := r.Worktree()
@@ -198,7 +198,7 @@ func (s *WorktreeSuite) TestPullProgressWithRecursion(c *C) {
r, _ := PlainInit(dir, false)
r.CreateRemote(&config.RemoteConfig{
Name: DefaultRemoteName,
- URL: path,
+ URLs: []string{path},
})
w, err := r.Worktree()