Xgit v0.8.0 Xgit.Config View Source
Provides convenience functions to get specific configuration values from a repository.
IMPORTANT: The on-disk repository implementation (Xgit.Repository.OnDisk
) does not
examine configuration directives in global or home directory.
This module should be considered roughly analogous to the
git config
command.
Link to this section Summary
Functions
Return the config value interpreted as a boolean.
Return the config value interpreted as an integer.
If there is a single string for this variable, return it.
Get the list of strings for this variable.
Link to this section Functions
get_boolean(repository, section, subsection \\ nil, name, default)
View SourceReturn the config value interpreted as a boolean.
Use default
if it can not be interpreted as such.
get_integer(repository, section, subsection \\ nil, name, default)
View SourceReturn the config value interpreted as an integer.
Use default
if it can not be interpreted as such.
get_string(repository, section, subsection \\ nil, name)
View Sourceget_string( repository :: Xgit.Repository.t(), section :: String.t(), subsection :: String.t() | nil, name :: String.t() ) :: String.t() | nil | :empty
If there is a single string for this variable, return it.
If there are zero or multiple values for this variable, return nil
.
If there is exactly one value, but it was implied (missing =
), return :empty
.
get_string_list(repository, section, subsection \\ nil, name)
View Sourceget_string_list( repository :: Xgit.Repository.t(), section :: String.t(), subsection :: String.t() | nil, name :: String.t() ) :: [String.t() | nil]
Get the list of strings for this variable.