From 4e64c834e2cd672f3daff59fe8117873688dfebc Mon Sep 17 00:00:00 2001 From: Josh Bialkowski Date: Fri, 13 Dec 2019 13:17:26 -0800 Subject: 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 --- repository/config_git.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'repository/config_git.go') 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] } -- cgit