]> git.e2factory.org Git - e2factory.git/commitdiff
Quote most e2lib.git() parameters
authorTobias Ulmer <tu@emlix.com>
Tue, 10 Jul 2012 13:05:44 +0000 (15:05 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 10 Jul 2012 13:05:44 +0000 (15:05 +0200)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 7d65d797440c4b21d0570db0dd736e05c158cd51..718bbf397d59ba88b96e160333ad439ee192382a 100644 (file)
@@ -1580,8 +1580,9 @@ function git(gitdir, subtool, args)
        if not git then
                return false, e:cat(re)
        end
-       local call = string.format("GIT_DIR='%s' %s %s %s", gitdir, git,
-                                                               subtool, args)
+       -- TODO: args should be quoted as well
+       local call = string.format("GIT_DIR=%s %s %s %s",
+           shquote(gitdir), shquote(git), shquote(subtool), args)
        rc, re = callcmd_log(call)
        if rc ~= 0 then
                e:append(call)