diff options
author | Michael Muré <batolettre@gmail.com> | 2019-06-19 18:11:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 18:11:31 +0200 |
commit | 89c6732354ba4efd7c36c253fc5d02f0b6c7a7a4 (patch) | |
tree | 1d31091fa66d11a56bcbb9697bcefc2c9ab8951c /repository/git.go | |
parent | 777ccb9c68e10bdd9b8a4d33449795dd6e52f768 (diff) | |
parent | acfd8ffdd7b2e019168467810a817a0b6ea084e6 (diff) | |
download | git-bug-89c6732354ba4efd7c36c253fc5d02f0b6c7a7a4.tar.gz |
Merge pull request #156 from A-Hilaly/bridge-rm
Fix bridge rm command
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 } |