Documentation
¶
Overview ¶
Package gitconfig provides functionality around storing Git Town configuration information as Git metadata. Git Town stores configuration in two locations: 1. Git metadata of the local repository. You can see it with `git config -l --local` 2. Global Git metadata. You can seet it with `git config -l --global`
Index ¶
- type Access
- func (self *Access) Load(scopeOpt Option[configdomain.ConfigScope], updateOutdated bool) (configdomain.SingleSnapshot, error)
- func (self *Access) RemoteURL(remote gitdomain.Remote) Option[string]
- func (self *Access) RemoveConfigValue(scope configdomain.ConfigScope, key configdomain.Key) error
- func (self *Access) RemoveLocalConfigValue(key configdomain.Key) error
- func (self *Access) RemoveLocalGitConfiguration(localSnapshot configdomain.SingleSnapshot) error
- func (self *Access) SetConfigValue(scope configdomain.ConfigScope, key configdomain.Key, value string) error
- func (self *Access) UpdateDeprecatedSetting(scope configdomain.ConfigScope, oldKey, newKey configdomain.Key, value string)
- func (self *Access) UpdateExternalGitTownAlias(scope configdomain.ConfigScope, key configdomain.Key, ...)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Access ¶
type Access struct {
Runner
}
Access provides typesafe access to the Git configuration on disk.
func (*Access) Load ¶
func (self *Access) Load(scopeOpt Option[configdomain.ConfigScope], updateOutdated bool) (configdomain.SingleSnapshot, error)
func (*Access) RemoveConfigValue ¶
func (self *Access) RemoveConfigValue(scope configdomain.ConfigScope, key configdomain.Key) error
func (*Access) RemoveLocalConfigValue ¶
func (self *Access) RemoveLocalConfigValue(key configdomain.Key) error
removeLocalConfigurationValue deletes the configuration value with the given key from the local Git Town configuration.
func (*Access) RemoveLocalGitConfiguration ¶
func (self *Access) RemoveLocalGitConfiguration(localSnapshot configdomain.SingleSnapshot) error
RemoveLocalGitConfiguration removes all Git Town configuration.
func (*Access) SetConfigValue ¶
func (self *Access) SetConfigValue(scope configdomain.ConfigScope, key configdomain.Key, value string) error
SetConfigValue sets the given configuration setting in the global Git configuration.
func (*Access) UpdateDeprecatedSetting ¶
func (self *Access) UpdateDeprecatedSetting(scope configdomain.ConfigScope, oldKey, newKey configdomain.Key, value string)
func (*Access) UpdateExternalGitTownAlias ¶
func (self *Access) UpdateExternalGitTownAlias(scope configdomain.ConfigScope, key configdomain.Key, oldValue, newValue string)
updates a custom Git alias (not set up by Git Town)