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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user