diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-11-05 13:30:42 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-05 13:37:18 -0800 |
| commit | 0d95d68fb446b1c41b8b1ad15145edcc6e22cc48 (patch) | |
| tree | 19f42faee9661072d0eae5a0459bc728621018da /diff.c | |
| parent | whitespace: correct bit assignment comments (diff) | |
| download | git-0d95d68fb446b1c41b8b1ad15145edcc6e22cc48.tar.gz git-0d95d68fb446b1c41b8b1ad15145edcc6e22cc48.zip | |
diff: emit_line_ws_markup() if/else style fix
Apply the simple rule: if you need {} in one arm of the if/else
if/else... cascade, have {} in all of them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
| -rw-r--r-- | diff.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1327,14 +1327,14 @@ static void emit_line_ws_markup(struct diff_options *o, ws = NULL; } - if (!ws && !set_sign) + if (!ws && !set_sign) { emit_line_0(o, set, NULL, 0, reset, sign, line, len); - else if (!ws) { + } else if (!ws) { emit_line_0(o, set_sign, set, !!set_sign, reset, sign, line, len); - } else if (blank_at_eof) + } else if (blank_at_eof) { /* Blank line at EOF - paint '+' as well */ emit_line_0(o, ws, NULL, 0, reset, sign, line, len); - else { + } else { /* Emit just the prefix, then the rest. */ emit_line_0(o, set_sign ? set_sign : set, NULL, !!set_sign, reset, sign, "", 0); |
