aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-01-02 17:39:23 -0200
committerHisham Muhammad <hisham@gobolinux.org>2018-01-02 17:39:23 -0200
commitf3c56849c1defd7f75bd57965451b1d9c468c974 (patch)
treee7f832e7dad821f9e57496ceec55d5385271e855
parent24b814a6507c6e122c41b666c120157e1da5f521 (diff)
downloadluarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.tar.gz
luarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.tar.bz2
luarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.zip
git.lua: avoid quoting difficulties on Windows
-rw-r--r--src/luarocks/fetch/git.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fetch/git.lua b/src/luarocks/fetch/git.lua
index 27864989..efd62e6d 100644
--- a/src/luarocks/fetch/git.lua
+++ b/src/luarocks/fetch/git.lua
@@ -54,7 +54,7 @@ local function git_identifier(git_cmd, ver)
54 if not (ver:match("^dev%-%d+$") or ver:match("^scm%-%d+$")) then 54 if not (ver:match("^dev%-%d+$") or ver:match("^scm%-%d+$")) then
55 return nil 55 return nil
56 end 56 end
57 local pd = io.popen(fs.command_at(fs.current_dir(), fs.Q(git_cmd).." log --pretty=format:'%ai %h' -n 1")) 57 local pd = io.popen(fs.command_at(fs.current_dir(), fs.Q(git_cmd).." log --pretty=format:%ai_%h -n 1"))
58 if not pd then 58 if not pd then
59 return nil 59 return nil
60 end 60 end
@@ -63,7 +63,7 @@ local function git_identifier(git_cmd, ver)
63 if not date_hash then 63 if not date_hash then
64 return nil 64 return nil
65 end 65 end
66 local date, time, tz, hash = date_hash:match("([^%s]+) ([^%s]+) ([^%s]+) ([^%s]+)") 66 local date, time, tz, hash = date_hash:match("([^%s]+) ([^%s]+) ([^%s]+)_([^%s]+)")
67 date = date:gsub("%-", "") 67 date = date:gsub("%-", "")
68 time = time:gsub(":", "") 68 time = time:gsub(":", "")
69 return date .. "." .. time .. "." .. hash 69 return date .. "." .. time .. "." .. hash