aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/luarocks/fetch/git_http.tl (renamed from src/luarocks/fetch/git_http.lua)7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git_http.lua b/src/luarocks/fetch/git_http.tl
index d85e2572..4ff602d9 100644
--- a/src/luarocks/fetch/git_http.lua
+++ b/src/luarocks/fetch/git_http.tl
@@ -7,10 +7,13 @@
7-- source = { url = "git+http://example.com/foo.git" } 7-- source = { url = "git+http://example.com/foo.git" }
8-- Prefer using the normal git:// fetch mode as it is more widely 8-- Prefer using the normal git:// fetch mode as it is more widely
9-- available in older versions of LuaRocks. 9-- available in older versions of LuaRocks.
10local git_http = {} 10local record git_http
11end
11 12
12local git = require("luarocks.fetch.git") 13local git = require("luarocks.fetch.git")
13 14
15local 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.
21function git_http.get_sources(rockspec, extract, dest_dir) 24function git_http.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 return git.get_sources(rockspec, extract, dest_dir, "--") 26 return git.get_sources(rockspec, extract, dest_dir, "--")
24end 27end