diff options
-rw-r--r-- | src/luarocks/fetch/git_file.tl (renamed from src/luarocks/fetch/git_file.lua) | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git_file.lua b/src/luarocks/fetch/git_file.tl index 8d46bbca..90e14d12 100644 --- a/src/luarocks/fetch/git_file.lua +++ b/src/luarocks/fetch/git_file.tl | |||
@@ -1,9 +1,12 @@ | |||
1 | 1 | ||
2 | --- Fetch back-end for retrieving sources from local Git repositories. | 2 | --- Fetch back-end for retrieving sources from local Git repositories. |
3 | local git_file = {} | 3 | local record git_file |
4 | end | ||
4 | 5 | ||
5 | local git = require("luarocks.fetch.git") | 6 | local git = require("luarocks.fetch.git") |
6 | 7 | ||
8 | local type Rockspec = require("luarocks.core.types.rockspec").Rockspec | ||
9 | |||
7 | --- Fetch sources for building a rock from a local Git repository. | 10 | --- Fetch sources for building a rock from a local Git repository. |
8 | -- @param rockspec table: The rockspec table | 11 | -- @param rockspec table: The rockspec table |
9 | -- @param extract boolean: Unused in this module (required for API purposes.) | 12 | -- @param extract boolean: Unused in this module (required for API purposes.) |
@@ -11,7 +14,7 @@ local git = require("luarocks.fetch.git") | |||
11 | -- @return (string, string) or (nil, string): The absolute pathname of | 14 | -- @return (string, string) or (nil, string): The absolute pathname of |
12 | -- the fetched source tarball and the temporary directory created to | 15 | -- the fetched source tarball and the temporary directory created to |
13 | -- store it; or nil and an error message. | 16 | -- store it; or nil and an error message. |
14 | function git_file.get_sources(rockspec, extract, dest_dir) | 17 | function git_file.get_sources(rockspec: Rockspec, extract: boolean, dest_dir?: string): string, string |
15 | rockspec.source.url = rockspec.source.url:gsub("^git.file://", "") | 18 | rockspec.source.url = rockspec.source.url:gsub("^git.file://", "") |
16 | return git.get_sources(rockspec, extract, dest_dir) | 19 | return git.get_sources(rockspec, extract, dest_dir) |
17 | end | 20 | end |