Rework commit-msg to handle another special case

Paragraphs that look like footers (but aren't) were misinterpreted
sometimes.

Change-Id: I75809df030ba1060882e7dede11592f49f74dda5
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
Patrick Georgi
2012-03-07 21:42:24 +01:00
parent 26ad994028
commit bcc8dc3e24
2 changed files with 89 additions and 54 deletions

View File

@@ -388,6 +388,25 @@ public class CommitMsgHookTest extends HookTestCase {
"git://example.com/ fixes this\n"));
}
@Test
public void testWithFalseTags() throws Exception {
assertEquals("foo\n" + //
"\n" + //
"FakeLine:\n" + //
" foo\n" + //
" bar\n" + //
"\n" + //
"Change-Id: I67632a37fd2e08a35f766f52fc9a47f4ea868c55\n" + //
"RealTag: abc\n", //
call("foo\n" + //
"\n" + //
"FakeLine:\n" + //
" foo\n" + //
" bar\n" + //
"\n" + //
"RealTag: abc\n"));
}
private void hookDoesNotModify(final String in) throws Exception {
assertEquals(in, call(in));
}