diff options
-rw-r--r-- | src/luarocks/fetch/git_ssh.tl (renamed from src/luarocks/fetch/git_ssh.lua) | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git_ssh.lua b/src/luarocks/fetch/git_ssh.tl index 0c2c0750..b5c30e3a 100644 --- a/src/luarocks/fetch/git_ssh.lua +++ b/src/luarocks/fetch/git_ssh.tl | |||
@@ -7,10 +7,13 @@ | |||
7 | -- It also handles scp-style ssh urls: git@example.com:path/foo.git, | 7 | -- It also handles scp-style ssh urls: git@example.com:path/foo.git, |
8 | -- but you have to prepend the "git+ssh://" and why not use the "newer" | 8 | -- but you have to prepend the "git+ssh://" and why not use the "newer" |
9 | -- style anyway? | 9 | -- style anyway? |
10 | local git_ssh = {} | 10 | local record git_ssh |
11 | end | ||
11 | 12 | ||
12 | local git = require("luarocks.fetch.git") | 13 | local git = require("luarocks.fetch.git") |
13 | 14 | ||
15 | local type Rockspec = require("luarocks.core.types.rockspec").Rockspec | ||
16 | |||
14 | --- Fetch sources for building a rock from a local Git repository. | 17 | --- Fetch sources for building a rock from a local Git repository. |
15 | -- @param rockspec table: The rockspec table | 18 | -- @param rockspec table: The rockspec table |
16 | -- @param extract boolean: Unused in this module (required for API purposes.) | 19 | -- @param extract boolean: Unused in this module (required for API purposes.) |
@@ -18,7 +21,7 @@ local git = require("luarocks.fetch.git") | |||
18 | -- @return (string, string) or (nil, string): The absolute pathname of | 21 | -- @return (string, string) or (nil, string): The absolute pathname of |
19 | -- the fetched source tarball and the temporary directory created to | 22 | -- the fetched source tarball and the temporary directory created to |
20 | -- store it; or nil and an error message. | 23 | -- store it; or nil and an error message. |
21 | function git_ssh.get_sources(rockspec, extract, dest_dir) | 24 | function git_ssh.get_sources(rockspec: Rockspec, extract: boolean, dest_dir?: string): string, string |
22 | rockspec.source.url = rockspec.source.url:gsub("^git.", "") | 25 | rockspec.source.url = rockspec.source.url:gsub("^git.", "") |
23 | 26 | ||
24 | -- Handle old-style scp-like git ssh urls | 27 | -- Handle old-style scp-like git ssh urls |