]> git.e2factory.org Git - e2factory.git/commitdiff
generic_git: git_config() allow variable arguments
authorTobias Ulmer <tu@emlix.com>
Tue, 10 Jan 2017 14:32:07 +0000 (15:32 +0100)
committerTobias Ulmer <tu@emlix.com>
Tue, 10 Jan 2017 14:32:07 +0000 (15:32 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/generic_git.lua

index d16b179d09812c91d1a725324e4757de9a98c664..9d22307d697e6a34f48dde88e43593a6edb81b61 100644 (file)
@@ -3,7 +3,7 @@
 -- take url strings as parameter. The others take server / location.
 -- @module generic.generic_git
 
--- Copyright (C) 2007-2016 emlix GmbH, see file AUTHORS
+-- Copyright (C) 2007-2017 emlix GmbH, see file AUTHORS
 --
 -- This file is part of e2factory, the emlix embedded build system.
 -- For more information see http://www.e2factory.org
@@ -568,15 +568,15 @@ function generic_git.git_push(c, gitdir, server, location, refspec)
     return generic_git.git_push1(gitdir, rurl, refspec)
 end
 
---- Git config query.
+--- Git config get/set.
 -- @param gitdir string: gitdir
--- @param query string: query to pass to git config
+-- @param ... arguments to pass to git config
 -- @return Value printed to stdout by git config, or false on error.
 -- @return Error object on failure.
-function generic_git.git_config(gitdir, query)
+function generic_git.git_config(gitdir, ...)
     local e, rc, re, argv, out
 
-    argv = generic_git.git_new_argv(gitdir, false, "config", query)
+    argv = generic_git.git_new_argv(gitdir, false, "config", ...)
     rc, re, out = generic_git.git(argv)
     if not rc then
         e = err.new("git config failed")