• Junio C Hamano's avatar
    builtin-commit.c: fix logic to omit empty line before existing footers · e5138436
    Junio C Hamano authored
    "commit -s" used to add an empty line before adding S-o-b line only when
    the last line of the existing log message is not another S-o-b line, but
    c1e01b0c (commit: More generous accepting of RFC-2822 footer lines.,
    2009-10-28) introduced logic to omit this empty line when the message ends
    with a run of "footer" lines, to cover S-o-b's friends, e.g. Acked-by.
    
    However, the logic was overzealous and missed one corner case.  A message
    that consists of a single line that begins with Token + colon, it can be
    mistaken as a S-o-b's friend.  We do want an empty line in such a case.
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    e5138436
builtin-commit.c 30.5 KB