aboutsummaryrefslogtreecommitdiffstats
path: root/repository
diff options
context:
space:
mode:
authorJosh Bialkowski <josh.bialkowski@gmail.com>2019-12-13 13:17:26 -0800
committerJosh Bialkowski <josh.bialkowski@gmail.com>2019-12-18 07:42:16 -0800
commit4e64c834e2cd672f3daff59fe8117873688dfebc (patch)
tree694269594f13f4f9d545e0bd8a2c8a08df1e5a9e /repository
parent98bd372e604285cf79ffcf04d0fdf423200cab8f (diff)
downloadgit-bug-4e64c834e2cd672f3daff59fe8117873688dfebc.tar.gz
codereview #5: reverse-map and ImportWarning
* Fix git config reader can't read values with spaces * Add bug-id-revmap config option for the reverse map, and use this in the importer * 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. * Strip newlines from titles on import
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]
}