diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 17:39:23 -0200 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-01-02 17:39:23 -0200 |
| commit | f3c56849c1defd7f75bd57965451b1d9c468c974 (patch) | |
| tree | e7f832e7dad821f9e57496ceec55d5385271e855 /src | |
| parent | 24b814a6507c6e122c41b666c120157e1da5f521 (diff) | |
| download | luarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.tar.gz luarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.tar.bz2 luarocks-f3c56849c1defd7f75bd57965451b1d9c468c974.zip | |
git.lua: avoid quoting difficulties on Windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/fetch/git.lua | 4 |
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 |
