Merge pull request #72 from jdevera/nin
Branch Nin: Adding .git to uris although github lets you clone without them
This commit is contained in:
commit
2ace5098e2
@ -44,6 +44,9 @@ func! s:parse_name(arg)
|
|||||||
if arg =~? '^\s*\(gh\|github\):\S\+'
|
if arg =~? '^\s*\(gh\|github\):\S\+'
|
||||||
\ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$'
|
\ || arg =~? '^[a-z0-9][a-z0-9-]*/[^/]\+$'
|
||||||
let uri = 'https://github.com/'.split(arg, ':')[-1]
|
let uri = 'https://github.com/'.split(arg, ':')[-1]
|
||||||
|
if uri !~? '\.git$'
|
||||||
|
let uri .= '.git'
|
||||||
|
endif
|
||||||
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
|
let name = substitute(split(uri,'\/')[-1], '\.git\s*$','','i')
|
||||||
elseif arg =~? '^\s*\(git@\|git://\)\S\+'
|
elseif arg =~? '^\s*\(git@\|git://\)\S\+'
|
||||||
\ || arg =~? '\(file\|https\?\)://'
|
\ || arg =~? '\(file\|https\?\)://'
|
||||||
|
Loading…
Reference in New Issue
Block a user