aboutsummaryrefslogtreecommitdiffstats
path: root/repository
diff options
context:
space:
mode:
authorJosh Bialkowski <josh.bialkowski@gmail.com>2019-12-13 13:17:26 -0800
committerMichael Muré <batolettre@gmail.com>2020-01-04 13:04:15 +0100
commitf15206e7b1d60239f4e42c618297554bda524b5e (patch)
treedcd11ebfe7861e1de3b2ed82295303afddbcc213 /repository
parentca1d305308d4ee6d0fec16a0af10b62bb52cd265 (diff)
downloadgit-bug-f15206e7b1d60239f4e42c618297554bda524b5e.tar.gz
* Fix git config reader can't read values with spaces
* Add NewImportWarning for things that aren't exactly errors. Use this for unhandled changelog events. * Add NewExportWarning for things that aren't exactly errors. Use this for un-exportable status changes.
Diffstat (limited to 'repository')
-rw-r--r--repository/config_git.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/repository/config_git.go b/repository/config_git.go
index cff82afb..c4d222cf 100644
--- a/repository/config_git.go
+++ b/repository/config_git.go
@@ -66,11 +66,7 @@ func (gc *gitConfig) ReadAll(keyPrefix string) (map[string]string, error) {
continue
}
- parts := strings.Fields(line)
- if len(parts) != 2 {
- return nil, fmt.Errorf("bad git config: %s", line)
- }
-
+ parts := strings.SplitN(line, " ", 2)
result[parts[0]] = parts[1]
}