maintner: support multi-line commit message subjects

In git, the text up to the first blank line in a commit message
is treated as the commit subject.

Most subjects are short and fit in one line (hopefully under
50 characters). In some cases, they end up being split into
multiple lines.

Report the entire subject rather than just the first line,
and join multiple lines with spaces.

Reference: https://git-scm.com/docs/git-commit#_discussion.

Fixes golang/go#30101

Change-Id: I1ea8212202fce0033e5ac8075352d5d7e0ae823c
Reviewed-on: https://go-review.googlesource.com/c/161222
Reviewed-by: Andrew Bonventre <andybons@golang.org>
diff --git a/maintner/gerrit_test.go b/maintner/gerrit_test.go
index 691ae25..91822c5 100644
--- a/maintner/gerrit_test.go
+++ b/maintner/gerrit_test.go
@@ -229,6 +229,7 @@
 	testcases := []struct{ msg, subject string }{
 		{"maintner: slurp up all the things", "maintner: slurp up all the things"},
 		{"cmd/go: build stuff\n\nand do other stuff, too.", "cmd/go: build stuff"},
+		{"cmd/go: build lots\nof stuff\n\nand do other stuff, too.", "cmd/go: build lots of stuff"}, // Subject is separated from body by a blank line.
 	}
 	for _, tc := range testcases {
 		cl := &GerritCL{Commit: &GitCommit{Msg: tc.msg}}