diff options
Diffstat (limited to 'repository/git.go')
-rw-r--r-- | repository/git.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/repository/git.go b/repository/git.go index 801504f2..c8c45d6a 100644 --- a/repository/git.go +++ b/repository/git.go @@ -261,7 +261,12 @@ func (repo *GitRepo) ReadConfigString(key string) (string, error) { // RmConfigs remove all key/value pair matching the key prefix func (repo *GitRepo) RmConfigs(keyPrefix string) error { + // try to remove key/value pair by key _, err := repo.runGitCommand("config", "--unset-all", keyPrefix) + if err != nil { + // try to remove section + _, err = repo.runGitCommand("config", "--remove-section", keyPrefix) + } return err } |