Skip to content

Commit 1dd14e8

Browse files
rscharfegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4416b86 commit 1dd14e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pretty.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,10 +1852,10 @@ static size_t format_commit_item(struct strbuf *sb, /* in UTF-8 */
18521852
}
18531853

18541854
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)
18581856
consumed = format_commit_one(sb, placeholder, context);
1857+
else
1858+
consumed = format_and_pad_commit(sb, placeholder, context);
18591859
if (magic == NO_MAGIC)
18601860
return consumed;
18611861

0 commit comments

Comments
 (0)