Class
GgitConfig
Description [src]
final class Ggit.Config : Ggit.Native
{
/* No available fields */
}
Represents a git configuration.
Constructors
ggit_config_new
Create a new config. See also ggit_config_get_default()
to get
a GgitConfig
representing the global, XDG and system configuration files.
To get a GgitConfig
for a repository use #ggit_repository_get_config instead.
ggit_config_new_default
Get the global, XDG and system configuration files merged into one
GgitConfig
with their appropriate priority levels. If an error occured
trying to load the various configuration files, this function will return
NULL
and error
will be set accordingly.
ggit_config_new_from_file
Create a new config from a single on disk file. This is a convenience
API and is exactly the same as creating an empty GgitConfig
using
ggit_config_new and adding the file with #ggit_config_add_file. The
level will be set to #GGIT_CONFIG_LEVEL_LOCAL. If the config could not be
loaded this function returns NULL
and error
will be set accordingly.
Functions
ggit_config_find_global
Find the file representing the users global git configuration. This file
is usually located at $HOME/.gitconfig. This function will try to guess
the full path to that file, if the file exists. The returned file may then
be used with #ggit_config_new_from_file or #ggit_config_add_file. This
function returns NULL
if the global config could not be found.
ggit_config_find_system
Find the file representing the systems global git configuration. This file
is usually located at /etc/gitconfig on UNIX type systems or
PROGRAMFILES
%\Git\etc\gitconfig on windows. This function will try to guess
the full path to that file, if the file exists. The returned file may then
be used with #ggit_config_new_from_file or #ggit_config_add_file. This
function returns NULL
if the system config could not be found.
Instance methods
ggit_config_match
Matches a configuration against a regular expression. match_info
will
contain the match information if the return value is not NULL
, otherwise
error
will be set.
ggit_config_snapshot
Create a snapshot of the current state of the configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.g. a remote, submodule).
Properties
Properties inherited from GgitNative (1)
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.