File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11M = {}
22
33local function parse_git_output (result )
4- if not result or # result < 1 then
4+ if not result or # result < 0 then
55 return
66 end
77
8- local domain , repository = result [1 ]:gsub (" %.git%s*$" , " " ):match (" @(.*%..*):(.*)$" )
8+ result = vim .trim (result )
9+ local domain , repository = result :gsub (" %.git%s*$" , " " ):match (" @(.*%..*):(.*)$" )
910 if domain and repository then
1011 return " https://" .. domain .. " /" .. repository
1112 end
1213
13- local url = result [ 1 ] :gsub (" %.git%s*$" , " " ):match (" ^https?://.+" )
14+ local url = result :gsub (" %.git%s*$" , " " ):match (" ^https?://.+" )
1415 if url then
1516 return url
1617 end
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ local shell = {}
22
33function shell .execute (command , args , options )
44 local cmd = { command , unpack (args ) }
5+ options = options or {}
56 local opts = vim .tbl_extend (" force" , {}, options )
67
78 local obj = vim .system (cmd , opts ):wait ()
You can’t perform that action at this time.
0 commit comments