Git configuration operations — reading and writing config values, user info, system info and hostname.
Summary
Functions
Gets a Git configuration value (local → global → system).
Gets a Git configuration value from the global scope.
Gets a Git configuration value from the local (repo) scope.
Returns the configured Git user email, or nil if not set.
Returns the configured Git user name, or nil if not set.
Returns the machine's hostname.
Returns the current system user email from the USER_EMAIL env variable,
falling back to "user@domain.com".
Returns the current system user name.
Returns a map with the current Git user information.
Sets Git user name, email, and URL rewrite rules globally.
Functions
Gets a Git configuration value (local → global → system).
Accepts an optional cd: option to scope the lookup to a specific
repository directory.
Gets a Git configuration value from the global scope.
Accepts an optional cd: option (kept for signature parity with
config/2; ignored at the global scope).
Gets a Git configuration value from the local (repo) scope.
Accepts an optional cd: option to scope the lookup to a specific
repository directory.
@spec get_git_user_email() :: binary() | nil
Returns the configured Git user email, or nil if not set.
@spec get_git_user_name() :: binary() | nil
Returns the configured Git user name, or nil if not set.
@spec get_hostname() :: binary()
Returns the machine's hostname.
@spec get_system_user_email() :: binary()
Returns the current system user email from the USER_EMAIL env variable,
falling back to "user@domain.com".
@spec get_system_user_name() :: binary()
Returns the current system user name.
@spec get_user_info() :: map()
Returns a map with the current Git user information.
Falls back to system user information if Git is not configured.
Sets Git user name, email, and URL rewrite rules globally.