File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -231,8 +231,8 @@ function fromURL (res) {
231
231
res . type = 'git'
232
232
const match = urlparse . protocol === 'git+ssh:' && matchGitScp ( res . rawSpec )
233
233
if ( match ) {
234
+ setGitCommittish ( res , match . gitCommittish )
234
235
res . fetchSpec = match . fetchSpec
235
- res . gitCommittish = match . gitCommittish
236
236
} else {
237
237
setGitCommittish ( res , urlparse . hash != null ? urlparse . hash . slice ( 1 ) : '' )
238
238
urlparse . protocol = urlparse . protocol . replace ( / ^ g i t [ + ] / , '' )
Original file line number Diff line number Diff line change @@ -220,6 +220,18 @@ require('tap').test('basic', function (t) {
220
220
raw : 'git+ssh://git@notgithub.com/user/foo#semver:^1.2.3'
221
221
} ,
222
222
223
+ 'git+ssh://git@notgithub.com:user/foo#semver:^1.2.3' : {
224
+ name : null ,
225
+ escapedName : null ,
226
+ type : 'git' ,
227
+ hosted : null ,
228
+ saveSpec : 'git+ssh://git@notgithub.com:user/foo#semver:^1.2.3' ,
229
+ fetchSpec : 'git@notgithub.com:user/foo' ,
230
+ gitCommittish : null ,
231
+ gitRange : '^1.2.3' ,
232
+ raw : 'git+ssh://git@notgithub.com:user/foo#semver:^1.2.3'
233
+ } ,
234
+
223
235
'git+ssh://git@github.com/user/foo#semver:^1.2.3' : {
224
236
name : null ,
225
237
escapedName : null ,
@@ -231,6 +243,17 @@ require('tap').test('basic', function (t) {
231
243
raw : 'git+ssh://git@github.com/user/foo#semver:^1.2.3'
232
244
} ,
233
245
246
+ 'git+ssh://git@github.com:user/foo#semver:^1.2.3' : {
247
+ name : null ,
248
+ escapedName : null ,
249
+ type : 'git' ,
250
+ saveSpec : 'git+ssh://git@github.com/user/foo.git#semver:^1.2.3' ,
251
+ fetchSpec : 'ssh://git@github.com/user/foo.git' ,
252
+ gitCommittish : null ,
253
+ gitRange : '^1.2.3' ,
254
+ raw : 'git+ssh://git@github.com:user/foo#semver:^1.2.3'
255
+ } ,
256
+
234
257
'user/foo#semver:^1.2.3' : {
235
258
name : null ,
236
259
escapedName : null ,
You can’t perform that action at this time.
0 commit comments