···5252 // line, that line will be removed and everything after it will be
5353 // placed in BodyAppendix.
5454 BodyAppendix string
5555+5656+ // All headers completely unparsed
5757+ RawHeaders map[string][]string
5558}
56595760// Message returns the commit message for the header. The message consists of
···237240 break
238241 }
239242243243+ items := strings.SplitN(line, ":", 2)
244244+245245+ // we have "key: value"
246246+ if len(items) == 2 {
247247+ key := items[0]
248248+ val := items[1]
249249+ h.RawHeaders[key] = append(h.RawHeaders[key], val)
250250+ }
251251+240252 switch {
241253 case strings.HasPrefix(line, authorPrefix):
242254 u, err := ParsePatchIdentity(line[len(authorPrefix):])
···361373 }
362374363375 h := &PatchHeader{}
376376+ h.RawHeaders = msg.Header
364377365378 if strings.HasPrefix(mailLine, mailHeaderPrefix) {
366379 mailLine = strings.TrimPrefix(mailLine, mailHeaderPrefix)