1
0
mirror of https://github.com/git/git synced 2024-07-02 15:48:44 +00:00

pretty: avoid double negative in format_commit_item()

Test for equality with no_flush, which has enough negation already.  Get
rid of the unnecessary parentheses while at it.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
René Scharfe 2023-07-07 20:46:26 +02:00 committed by Junio C Hamano
parent 4416b86c6b
commit 1dd14e8e93

View File

@ -1852,10 +1852,10 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
}
orig_len = sb->len;
if ((context)->flush_type != no_flush)
consumed = format_and_pad_commit(sb, placeholder, context);
else
if (context->flush_type == no_flush)
consumed = format_commit_one(sb, placeholder, context);
else
consumed = format_and_pad_commit(sb, placeholder, context);
if (magic == NO_MAGIC)
return consumed;