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>

René Scharfe committed Jul 7, 2023 at 20:46 UTC 1dd14e8e934873eac6168649da4f200cda029b7b
1 file changed +3 -3
pretty.c
+3 -3
@@ -1852,10 +1852,10 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
1852 }
1853
1854 orig_len = sb->len;
1855 - if ((context)->flush_type != no_flush)
1856 - consumed = format_and_pad_commit(sb, placeholder, context);
1857 - else
1855 + if (context->flush_type == no_flush)
1856 consumed = format_commit_one(sb, placeholder, context);
1857 + else
1858 + consumed = format_and_pad_commit(sb, placeholder, context);
1859 if (magic == NO_MAGIC)
1860 return consumed;
1861