-- -- Warning: AUTOGENERATED DOCS. -- --- Class "Config". -- module("Config") --- Create a new Config object. -- --
Calls git_config_new:
This object is empty, so you have to add a file to it before you
-- can do anything with it.
-- @return Config or nil
on error.
-- @return Error string.
-- @name Config.new
function Config.new()
end
--- Create a new Config object.
--
--
Calls git_config_open_ondisk:
This method is a simple utility wrapper for the following sequence
-- of calls:
-- - git_config_new
-- - git_config_add_file_ondisk
-- @param path Path to the on-disk file to open. Must be of type string
.
-- @return Config or nil
on error.
-- @return Error string.
-- @name Config.open
function Config.open(path)
end
--- Destroy this object (will be called by Garbage Collector).
--
--
Calls git_config_free:
-- @name Config:free function Config:free() end --- object method. -- --
Calls git_config_add_file_ondisk:
The on-disk file pointed at by `path` will be opened and -- parsed; it's expected to be a native Git config file following -- the default Git config syntax (see man git-config).
Note that the configuration object will free the file -- automatically.
Further queries on this config object will access each
-- of the config file instances in order (instances with
-- a higher priority will be accessed first).
-- @param path path to the configuration file (backend) to add. Must be of type string
.
-- @param priority the priority the backend should have. Must be of type integer
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:add_file_ondisk
function Config:add_file_ondisk(path, priority)
end
--- object method.
--
-- @param name Must be of type string
.
-- @return integer
or nil
on error.
-- @return Error string.
-- @name Config:get_int32
function Config:get_int32(name)
end
--- object method.
--
-- @param name Must be of type string
.
-- @param value Must be of type integer
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:set_int32
function Config:set_int32(name, value)
end
--- object method.
--
-- @param name Must be of type string
.
-- @return integer
or nil
on error.
-- @return Error string.
-- @name Config:get_int64
function Config:get_int64(name)
end
--- object method.
--
-- @param name Must be of type string
.
-- @param value Must be of type integer
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:set_int64
function Config:set_int64(name, value)
end
--- object method.
--
--
Calls git_config_get_bool:
This function uses the usual C convention of 0 being false and
-- anything else true.
-- @param name the variable's name. Must be of type string
.
-- @return boolean
or nil
on error.
-- @return Error string.
-- @name Config:get_bool
function Config:get_bool(name)
end
--- object method.
--
--
Calls git_config_set_bool:
-- @param value the value to store. Must be of type boolean
.
-- @param name the variable's name. Must be of type string
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:set_bool
function Config:set_bool(value, name)
end
--- object method.
--
--
Calls git_config_get_string:
The string is owned by the variable and should not be freed by the
-- user.
-- @param name the variable's name. Must be of type string
.
-- @return string
or nil
on error.
-- @return Error string.
-- @name Config:get_string
function Config:get_string(name)
end
--- object method.
--
--
Calls git_config_set_string:
A copy of the string is made and the user is free to use it
-- afterwards.
-- @param name the variable's name. Must be of type string
.
-- @param value the string to store.. Must be of type string
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:set_string
function Config:set_string(name, value)
end
--- object method.
--
--
Calls git_config_delete:
-- @param name the variable to delete. Must be of type string
.
-- @return true
if no error.
-- @return Error string.
-- @name Config:delete
function Config:delete(name)
end