From 38550fadaebecbd9344fe024663ac92f747a1ed5 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 26 Jun 2013 18:15:50 +0200 Subject: [PATCH] e2lib.callcmd() is for internal use only, mark local Signed-off-by: Tobias Ulmer --- generic/e2lib.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/generic/e2lib.lua b/generic/e2lib.lua index eac1cc9..fe46241 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -989,7 +989,7 @@ end --- callcmd: call a command, connecting -- stdin, stdout, stderr to luafile objects. -function e2lib.callcmd(infile, outfile, errfile, cmd) +local function callcmd(infile, outfile, errfile, cmd) -- redirect stdin io.stdin:close() luafile.dup2(infile:fileno(), 0) @@ -1025,7 +1025,7 @@ function e2lib.callcmd_redirect(cmd, out) e2lib.logf(3, "+ %s", cmd) pid = e2util.fork() if pid == 0 then - rc = e2lib.callcmd(devnull, out, out, cmd) + rc = callcmd(devnull, out, out, cmd) os.exit(rc) else rc = e2util.wait(pid) @@ -1086,7 +1086,7 @@ function e2lib.callcmd_pipe(cmds, infile, outfile) end errin:close() - rc = e2lib.callcmd(input, output, errout, cmds[cmdidx]) + rc = callcmd(input, output, errout, cmds[cmdidx]) os.exit(rc) end @@ -1194,7 +1194,7 @@ function e2lib.callcmd_capture(cmd, capture) pid = e2util.fork() if pid == 0 then oread:close() - rc = e2lib.callcmd(devnull, owrite, owrite, cmd) + rc = callcmd(devnull, owrite, owrite, cmd) os.exit(rc) else owrite:close() @@ -1673,6 +1673,11 @@ function e2lib.git(gitdir, subtool, args) return true, e end +function e2lib.git_argv(argv) + return e2lib.call_tool_argv("git") +end + + --- call the svn command -- @param argv table: vector with arguments for svn -- @return bool -- 2.39.5