Files
git/builtin
Brian Lyles c02414a997 interpret-trailers: handle message without trailing newline
When git-interpret-trailers is used to add a trailer to a message that
does not end in a trailing newline, the new trailer is added on the line
immediately following the message instead of as a trailer block
separated from the message by a blank line.

For example, if a message's text was exactly "The subject" with no
trailing newline present, `git interpret-trailers --trailer
my-trailer=true` will result in the following malformed commit message:

    The subject
    my-trailer: true

While it is generally expected that a commit message should end with a
newline character, git-interpret-trailers should not be returning an
invalid message in this case.

Use `strbuf_complete_line` to ensure that the message ends with a
newline character when reading the input.

Signed-off-by: Brian Lyles <brianmlyles@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-09-06 09:21:44 -07:00
..
2024-07-08 14:53:10 -07:00
2024-05-21 09:07:48 -07:00
2024-07-08 14:53:10 -07:00
2024-07-08 14:53:10 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-04-18 12:30:42 -07:00
2024-07-08 14:53:10 -07:00
2024-02-13 10:18:50 -08:00
2024-07-08 14:53:10 -07:00
2024-06-06 12:49:23 -07:00
2024-04-18 12:30:42 -07:00
2024-07-08 14:53:10 -07:00
2024-06-20 15:45:12 -07:00
2024-07-08 14:53:10 -07:00
2024-07-02 09:59:01 -07:00
2024-04-18 12:30:42 -07:00
2024-06-11 13:15:08 -07:00
2024-07-08 14:53:10 -07:00
2024-05-30 08:55:29 -07:00
2024-07-02 09:59:00 -07:00
2024-04-18 12:30:42 -07:00
2024-05-17 10:33:39 -07:00
2024-07-02 09:59:01 -07:00
2024-06-06 12:49:23 -07:00
2024-06-11 13:15:06 -07:00
2024-04-29 20:42:30 +02:00
2024-06-06 12:49:23 -07:00
2024-04-18 12:30:42 -07:00