diff options
author | amine <hilalyamine@gmail.com> | 2019-11-01 21:47:34 +0100 |
---|---|---|
committer | amine <hilalyamine@gmail.com> | 2019-11-01 21:47:34 +0100 |
commit | b85b2c57a73a6068fdc446866f79115315082997 (patch) | |
tree | ed5342d1aedea684e366de522a907423c8da9153 | |
parent | 93048080705cb9f3806fa456dc0642e3a143849b (diff) | |
download | git-bug-b85b2c57a73a6068fdc446866f79115315082997.tar.gz |
repository: improve documentation and fix typo mistake
-rw-r--r-- | repository/config_git.go | 10 | ||||
-rw-r--r-- | repository/git.go | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/repository/config_git.go b/repository/config_git.go index bdc86201..22666de7 100644 --- a/repository/config_git.go +++ b/repository/config_git.go @@ -31,7 +31,7 @@ func newGitConfig(repo *GitRepo, global bool) *gitConfig { // StoreConfig store a single key/value pair in the config of the repo func (gc *gitConfig) StoreString(key string, value string) error { - _, err := gc.repo.runGitCommand("config", "gc.localityFlag", "--replace-all", key, value) + _, err := gc.repo.runGitCommand("config", gc.localityFlag, "--replace-all", key, value) return err } @@ -45,7 +45,7 @@ func (gc *gitConfig) StoreTimestamp(key string, value time.Time) error { // ReadConfigs read all key/value pair matching the key prefix func (gc *gitConfig) ReadAll(keyPrefix string) (map[string]string, error) { - stdout, err := gc.repo.runGitCommand("config", "gc.localityFlag", "--get-regexp", keyPrefix) + stdout, err := gc.repo.runGitCommand("config", gc.localityFlag, "--get-regexp", keyPrefix) // / \ // / ! \ @@ -78,7 +78,7 @@ func (gc *gitConfig) ReadAll(keyPrefix string) (map[string]string, error) { } func (gc *gitConfig) ReadString(key string) (string, error) { - stdout, err := gc.repo.runGitCommand("config", "gc.localityFlag", "--get-all", key) + stdout, err := gc.repo.runGitCommand("config", gc.localityFlag, "--get-all", key) // / \ // / ! \ @@ -120,12 +120,12 @@ func (gc *gitConfig) ReadTimestamp(key string) (*time.Time, error) { } func (gc *gitConfig) rmSection(keyPrefix string) error { - _, err := gc.repo.runGitCommand("config", "gc.localityFlag", "--remove-section", keyPrefix) + _, err := gc.repo.runGitCommand("config", gc.localityFlag, "--remove-section", keyPrefix) return err } func (gc *gitConfig) unsetAll(keyPrefix string) error { - _, err := gc.repo.runGitCommand("config", "gc.localityFlag", "--unset-all", keyPrefix) + _, err := gc.repo.runGitCommand("config", gc.localityFlag, "--unset-all", keyPrefix) return err } diff --git a/repository/git.go b/repository/git.go index 0951b577..2b00d1f2 100644 --- a/repository/git.go +++ b/repository/git.go @@ -30,12 +30,12 @@ type GitRepo struct { editClock *lamport.Persisted } -// LocalConfig . +// LocalConfig give access to the repository scoped configuration func (repo *GitRepo) LocalConfig() Config { return newGitConfig(repo, false) } -// GlobalConfig . +// GlobalConfig give access to the git global configuration func (repo *GitRepo) GlobalConfig() Config { return newGitConfig(repo, true) } |