@@ -24,6 +24,8 @@ func (s *ConfigSuite) TestUnmarshall(c *C) {
24
24
url = [email protected] :src-d/go-git.git
25
25
fetch = +refs/heads/*:refs/remotes/origin/*
26
26
fetch = +refs/pull/*:refs/remotes/origin/pull/*
27
+ [remote "win-local"]
28
+ url = X:\\Git\\
27
29
[submodule "qux"]
28
30
path = qux
29
31
url = https://github.com/foo/qux.git
@@ -41,13 +43,15 @@ func (s *ConfigSuite) TestUnmarshall(c *C) {
41
43
c .Assert (cfg .Core .Worktree , Equals , "foo" )
42
44
c .Assert (cfg .Core .CommentChar , Equals , "bar" )
43
45
c .Assert (cfg .Pack .Window , Equals , uint (20 ))
44
- c .Assert (cfg .Remotes , HasLen , 2 )
46
+ c .Assert (cfg .Remotes , HasLen , 3 )
45
47
c .Assert (cfg .Remotes ["origin" ].Name , Equals , "origin" )
46
48
c .
Assert (
cfg .
Remotes [
"origin" ].
URLs ,
DeepEquals , []
string {
"[email protected] :mcuadros/go-git.git" })
47
49
c .Assert (cfg .Remotes ["origin" ].Fetch , DeepEquals , []RefSpec {"+refs/heads/*:refs/remotes/origin/*" })
48
50
c .Assert (cfg .Remotes ["alt" ].Name , Equals , "alt" )
49
51
c .
Assert (
cfg .
Remotes [
"alt" ].
URLs ,
DeepEquals , []
string {
"[email protected] :mcuadros/go-git.git" ,
"[email protected] :src-d/go-git.git" })
50
52
c .Assert (cfg .Remotes ["alt" ].Fetch , DeepEquals , []RefSpec {"+refs/heads/*:refs/remotes/origin/*" , "+refs/pull/*:refs/remotes/origin/pull/*" })
53
+ c .Assert (cfg .Remotes ["win-local" ].Name , Equals , "win-local" )
54
+ c .Assert (cfg .Remotes ["win-local" ].URLs , DeepEquals , []string {"X:\\ Git\\ " })
51
55
c .Assert (cfg .Submodules , HasLen , 1 )
52
56
c .Assert (cfg .Submodules ["qux" ].Name , Equals , "qux" )
53
57
c .Assert (cfg .Submodules ["qux" ].URL , Equals , "https://github.com/foo/qux.git" )
@@ -69,6 +73,8 @@ func (s *ConfigSuite) TestMarshall(c *C) {
69
73
fetch = +refs/pull/*:refs/remotes/origin/pull/*
70
74
[remote "origin"]
71
75
url = [email protected] :mcuadros/go-git.git
76
+ [remote "win-local"]
77
+ url = "X:\\Git\\"
72
78
[submodule "qux"]
73
79
url = https://github.com/foo/qux.git
74
80
[branch "master"]
@@ -91,6 +97,11 @@ func (s *ConfigSuite) TestMarshall(c *C) {
91
97
Fetch : []RefSpec {"+refs/heads/*:refs/remotes/origin/*" , "+refs/pull/*:refs/remotes/origin/pull/*" },
92
98
}
93
99
100
+ cfg .Remotes ["win-local" ] = & RemoteConfig {
101
+ Name : "win-local" ,
102
+ URLs : []string {"X:\\ Git\\ " },
103
+ }
104
+
94
105
cfg .Submodules ["qux" ] = & Submodule {
95
106
Name : "qux" ,
96
107
URL : "https://github.com/foo/qux.git" ,
@@ -119,6 +130,8 @@ func (s *ConfigSuite) TestUnmarshallMarshall(c *C) {
119
130
url = [email protected] :mcuadros/go-git.git
120
131
fetch = +refs/heads/*:refs/remotes/origin/*
121
132
mirror = true
133
+ [remote "win-local"]
134
+ url = "X:\\Git\\"
122
135
[branch "master"]
123
136
remote = origin
124
137
merge = refs/heads/master
0 commit comments