summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2023-07-07 18:46:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-07-07 19:05:42 (GMT)
commit1dd14e8e934873eac6168649da4f200cda029b7b (patch)
tree48f217c3061cf16bc2e79fd30b83cedcb404ce1e /pretty.c
parent4416b86c6b34dad64b556bb1eb6711d5e6595a48 (diff)
downloadgit-1dd14e8e934873eac6168649da4f200cda029b7b.zip
git-1dd14e8e934873eac6168649da4f200cda029b7b.tar.gz
git-1dd14e8e934873eac6168649da4f200cda029b7b.tar.bz2
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>
Diffstat (limited to 'pretty.c')
-rw-r--r--pretty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index 4c08f98..a6c617b 100644
--- a/pretty.c
+++ b/pretty.c
@@ -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;