summaryrefslogtreecommitdiff
path: root/pretty.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-07-17 18:30:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2023-07-17 18:30:41 (GMT)
commit55e8fad660e52df2be425a65d409226237fcff48 (patch)
treea2a5c2e6e95077870a6ac2a32f57a64f97671cea /pretty.c
parent377d1ca423c936236f7907443cb8e5fa76111c9f (diff)
parent1dd14e8e934873eac6168649da4f200cda029b7b (diff)
downloadgit-55e8fad660e52df2be425a65d409226237fcff48.zip
git-55e8fad660e52df2be425a65d409226237fcff48.tar.gz
git-55e8fad660e52df2be425a65d409226237fcff48.tar.bz2
Merge branch 'rs/pretty-format-double-negation-fix'
Code clarification. * rs/pretty-format-double-negation-fix: pretty: avoid double negative in format_commit_item()
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 7862be1..81cdc9f 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1855,10 +1855,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;