@@ -26,158 +26,161 @@ const invalid = [
26
26
// a subset of properties to a found object pass as you would expect
27
27
const GitHost = require ( '../lib/git-host' )
28
28
const defaults = { constructor : GitHost , type : 'github' , user : 'foo' , project : 'bar' }
29
+ // This is a valid git branch name that contains other occurences of the characters we check
30
+ // for to determine the committish in order to test that we parse those correctly
31
+ const committishDefaults = { committish : 'lk/br@nch.t#st:^1.0.0-pre.4' }
29
32
const valid = {
30
33
// extreme shorthand
31
34
//
32
35
// NOTE these do not accept auth at all
33
36
'foo/bar' : { ...defaults , default : 'shortcut' } ,
34
- ' foo/bar#branch:^1.0.0' : { ...defaults , default : 'shortcut' , committish : 'branch:^1.0.0' } ,
37
+ [ ` foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , ... committishDefaults } ,
35
38
36
39
'foo/bar.git' : { ...defaults , default : 'shortcut' } ,
37
- ' foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'shortcut' , committish : 'branch:^1.0.0' } ,
40
+ [ ` foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , ... committishDefaults } ,
38
41
39
42
// shortcuts
40
43
//
41
44
// NOTE auth is accepted but ignored
42
45
'github:foo/bar' : { ...defaults , default : 'shortcut' } ,
43
- ' github:foo/bar#branch:^1.0.0' : { ...defaults , default : 'shortcut' , committish : 'branch:^1.0.0' } ,
46
+ [ ` github:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , ... committishDefaults } ,
44
47
'github:user@foo/bar' : { ...defaults , default : 'shortcut' , auth : null } ,
45
- ' github:user@foo/bar#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
48
+ [ ` github:user@foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
46
49
'github:user:password@foo/bar' : { ...defaults , default : 'shortcut' , auth : null } ,
47
- ' github:user:password@foo/bar#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
50
+ [ ` github:user:password@foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
48
51
'github::password@foo/bar' : { ...defaults , default : 'shortcut' , auth : null } ,
49
- ' github::password@foo/bar#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
52
+ [ ` github::password@foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
50
53
51
54
'github:foo/bar.git' : { ...defaults , default : 'shortcut' } ,
52
- ' github:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'shortcut' , committish : 'branch:^1.0.0' } ,
55
+ [ ` github:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , ... committishDefaults } ,
53
56
'github:user@foo/bar.git' : { ...defaults , default : 'shortcut' , auth : null } ,
54
- ' github:user@foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
57
+ [ ` github:user@foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
55
58
'github:user:password@foo/bar.git' : { ...defaults , default : 'shortcut' , auth : null } ,
56
- ' github:user:password@foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
59
+ [ ` github:user:password@foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
57
60
'github::password@foo/bar.git' : { ...defaults , default : 'shortcut' , auth : null } ,
58
- ' github::password@foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'shortcut' , auth : null , committish : 'branch:^1.0.0' } ,
61
+ [ ` github::password@foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'shortcut' , auth : null , ... committishDefaults } ,
59
62
60
63
// git urls
61
64
//
62
65
// NOTE auth is accepted and respected
63
66
'git://github.com/foo/bar' : { ...defaults , default : 'git' } ,
64
- ' git://github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'git' , committish : 'branch:^1.0.0' } ,
67
+ [ ` git://github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , ... committishDefaults } ,
65
68
'git://user@github.com/foo/bar' : { ...defaults , default : 'git' , auth : 'user' } ,
66
- ' git://user@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'git' , auth : 'user' , committish : 'branch:^1.0.0' } ,
69
+ [ ` git://user@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : 'user' , ... committishDefaults } ,
67
70
'git://user:password@github.com/foo/bar' : { ...defaults , default : 'git' , auth : 'user:password' } ,
68
- ' git://user:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'git' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
71
+ [ ` git://user:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : 'user:password' , ... committishDefaults } ,
69
72
'git://:password@github.com/foo/bar' : { ...defaults , default : 'git' , auth : ':password' } ,
70
- ' git://:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'git' , auth : ':password' , committish : 'branch:^1.0.0' } ,
73
+ [ ` git://:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : ':password' , ... committishDefaults } ,
71
74
72
75
'git://github.com/foo/bar.git' : { ...defaults , default : 'git' } ,
73
- ' git://github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'git' , committish : 'branch:^1.0.0' } ,
76
+ [ ` git://github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , ... committishDefaults } ,
74
77
'git://git@github.com/foo/bar.git' : { ...defaults , default : 'git' , auth : 'git' } ,
75
- ' git://git@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'git' , auth : 'git' , committish : 'branch:^1.0.0' } ,
78
+ [ ` git://git@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : 'git' , ... committishDefaults } ,
76
79
'git://user:password@github.com/foo/bar.git' : { ...defaults , default : 'git' , auth : 'user:password' } ,
77
- ' git://user:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'git' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
80
+ [ ` git://user:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : 'user:password' , ... committishDefaults } ,
78
81
'git://:password@github.com/foo/bar.git' : { ...defaults , default : 'git' , auth : ':password' } ,
79
- ' git://:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'git' , auth : ':password' , committish : 'branch:^1.0.0' } ,
82
+ [ ` git://:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'git' , auth : ':password' , ... committishDefaults } ,
80
83
81
84
// no-protocol git+ssh
82
85
//
83
86
// NOTE auth is _required_ (see invalid list) but ignored
84
87
'user@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
85
- ' user@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
88
+ [ ` user@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
86
89
'user:password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
87
- ' user:password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
90
+ [ ` user:password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
88
91
':password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
89
- ' :password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
92
+ [ ` :password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
90
93
91
94
'user@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
92
- ' user@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
95
+ [ ` user@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
93
96
'user:password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
94
- ' user:password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
97
+ [ ` user:password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
95
98
':password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
96
- ' :password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
99
+ [ ` :password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
97
100
98
101
// git+ssh urls
99
102
//
100
103
// NOTE auth is accepted but ignored
101
104
'git+ssh://github.com:foo/bar' : { ...defaults , default : 'sshurl' } ,
102
- ' git+ssh://github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , committish : 'branch:^1.0.0' } ,
105
+ [ ` git+ssh://github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , ... committishDefaults } ,
103
106
'git+ssh://user@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
104
- ' git+ssh://user@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
107
+ [ ` git+ssh://user@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
105
108
'git+ssh://user:password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
106
- ' git+ssh://user:password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
109
+ [ ` git+ssh://user:password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
107
110
'git+ssh://:password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
108
- ' git+ssh://:password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
111
+ [ ` git+ssh://:password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
109
112
110
113
'git+ssh://github.com:foo/bar.git' : { ...defaults , default : 'sshurl' } ,
111
- ' git+ssh://github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , committish : 'branch:^1.0.0' } ,
114
+ [ ` git+ssh://github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , ... committishDefaults } ,
112
115
'git+ssh://user@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
113
- ' git+ssh://user@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
116
+ [ ` git+ssh://user@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
114
117
'git+ssh://user:password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
115
- ' git+ssh://user:password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
118
+ [ ` git+ssh://user:password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
116
119
'git+ssh://:password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
117
- ' git+ssh://:password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
120
+ [ ` git+ssh://:password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
118
121
119
122
// ssh urls
120
123
//
121
124
// NOTE auth is accepted but ignored
122
125
'ssh://github.com:foo/bar' : { ...defaults , default : 'sshurl' } ,
123
- ' ssh://github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , committish : 'branch:^1.0.0' } ,
126
+ [ ` ssh://github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , ... committishDefaults } ,
124
127
'ssh://user@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
125
- ' ssh://user@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
128
+ [ ` ssh://user@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
126
129
'ssh://user:password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
127
- ' ssh://user:password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
130
+ [ ` ssh://user:password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
128
131
'ssh://:password@github.com:foo/bar' : { ...defaults , default : 'sshurl' , auth : null } ,
129
- ' ssh://:password@github.com:foo/bar#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
132
+ [ ` ssh://:password@github.com:foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
130
133
131
134
'ssh://github.com:foo/bar.git' : { ...defaults , default : 'sshurl' } ,
132
- ' ssh://github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , committish : 'branch:^1.0.0' } ,
135
+ [ ` ssh://github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , ... committishDefaults } ,
133
136
'ssh://user@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
134
- ' ssh://user@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
137
+ [ ` ssh://user@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
135
138
'ssh://user:password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
136
- ' ssh://user:password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
139
+ [ ` ssh://user:password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
137
140
'ssh://:password@github.com:foo/bar.git' : { ...defaults , default : 'sshurl' , auth : null } ,
138
- ' ssh://:password@github.com:foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'sshurl' , auth : null , committish : 'branch:^1.0.0' } ,
141
+ [ ` ssh://:password@github.com:foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'sshurl' , auth : null , ... committishDefaults } ,
139
142
140
143
// git+https urls
141
144
//
142
145
// NOTE auth is accepted and respected
143
146
'git+https://github.com/foo/bar' : { ...defaults , default : 'https' } ,
144
- ' git+https://github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , committish : 'branch:^1.0.0' } ,
147
+ [ ` git+https://github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , ... committishDefaults } ,
145
148
'git+https://user@github.com/foo/bar' : { ...defaults , default : 'https' , auth : 'user' } ,
146
- ' git+https://user@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user' , committish : 'branch:^1.0.0' } ,
149
+ [ ` git+https://user@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user' , ... committishDefaults } ,
147
150
'git+https://user:password@github.com/foo/bar' : { ...defaults , default : 'https' , auth : 'user:password' } ,
148
- ' git+https://user:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
151
+ [ ` git+https://user:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user:password' , ... committishDefaults } ,
149
152
'git+https://:password@github.com/foo/bar' : { ...defaults , default : 'https' , auth : ':password' } ,
150
- ' git+https://:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : ':password' , committish : 'branch:^1.0.0' } ,
153
+ [ ` git+https://:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : ':password' , ... committishDefaults } ,
151
154
152
155
'git+https://github.com/foo/bar.git' : { ...defaults , default : 'https' } ,
153
- ' git+https://github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , committish : 'branch:^1.0.0' } ,
156
+ [ ` git+https://github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , ... committishDefaults } ,
154
157
'git+https://user@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : 'user' } ,
155
- ' git+https://user@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user' , committish : 'branch:^1.0.0' } ,
158
+ [ ` git+https://user@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user' , ... committishDefaults } ,
156
159
'git+https://user:password@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : 'user:password' } ,
157
- ' git+https://user:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
160
+ [ ` git+https://user:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user:password' , ... committishDefaults } ,
158
161
'git+https://:password@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : ':password' } ,
159
- ' git+https://:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : ':password' , committish : 'branch:^1.0.0' } ,
162
+ [ ` git+https://:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : ':password' , ... committishDefaults } ,
160
163
161
164
// https urls
162
165
//
163
166
// NOTE auth is accepted and respected
164
167
'https://github.com/foo/bar' : { ...defaults , default : 'https' } ,
165
- ' https://github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , committish : 'branch:^1.0.0' } ,
168
+ [ ` https://github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , ... committishDefaults } ,
166
169
'https://user@github.com/foo/bar' : { ...defaults , default : 'https' , auth : 'user' } ,
167
- ' https://user@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user' , committish : 'branch:^1.0.0' } ,
170
+ [ ` https://user@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user' , ... committishDefaults } ,
168
171
'https://user:password@github.com/foo/bar' : { ...defaults , default : 'https' , auth : 'user:password' } ,
169
- ' https://user:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
172
+ [ ` https://user:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user:password' , ... committishDefaults } ,
170
173
'https://:password@github.com/foo/bar' : { ...defaults , default : 'https' , auth : ':password' } ,
171
- ' https://:password@github.com/foo/bar#branch:^1.0.0' : { ...defaults , default : 'https' , auth : ':password' , committish : 'branch:^1.0.0' } ,
174
+ [ ` https://:password@github.com/foo/bar#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : ':password' , ... committishDefaults } ,
172
175
173
176
'https://github.com/foo/bar.git' : { ...defaults , default : 'https' } ,
174
- ' https://github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , committish : 'branch:^1.0.0' } ,
177
+ [ ` https://github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , ... committishDefaults } ,
175
178
'https://user@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : 'user' } ,
176
- ' https://user@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user' , committish : 'branch:^1.0.0' } ,
179
+ [ ` https://user@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user' , ... committishDefaults } ,
177
180
'https://user:password@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : 'user:password' } ,
178
- ' https://user:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : 'user:password' , committish : 'branch:^1.0.0' } ,
181
+ [ ` https://user:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : 'user:password' , ... committishDefaults } ,
179
182
'https://:password@github.com/foo/bar.git' : { ...defaults , default : 'https' , auth : ':password' } ,
180
- ' https://:password@github.com/foo/bar.git#branch:^1.0.0' : { ...defaults , default : 'https' , auth : ':password' , committish : 'branch:^1.0.0' } ,
183
+ [ ` https://:password@github.com/foo/bar.git#${ committishDefaults . committish } ` ] : { ...defaults , default : 'https' , auth : ':password' , ... committishDefaults } ,
181
184
182
185
// inputs that are not quite proper but we accept anyway
183
186
'https://www.github.com/foo/bar' : { ...defaults , default : 'https' } ,
0 commit comments