diff.c: reorder arguments for emit_line_ws_markup

The order shall be all colors first, then the content, flags at the end. The colors are in the order of occurrence, i.e. first the color for the sign and then the color for the rest of the line. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Aug 13, 2018 at 18:41 UTC 9d1e16bf59cd35e1019e63b171ddf9209e0f53a1
1 file changed +6 -6
diff.c
+6 -6
@@ -1185,9 +1185,9 @@ static void dim_moved_lines(struct diff_options *o)
1185 }
1186
1187 static void emit_line_ws_markup(struct diff_options *o,
1188 - const char *set, const char *reset,
1189 - const char *line, int len,
1190 - const char *set_sign, char sign,
1188 + const char *set_sign, const char *set,
1189 + const char *reset,
1190 + char sign, const char *line, int len,
1191 unsigned ws_rule, int blank_at_eof)
1192 {
1193 const char *ws = NULL;
@@ -1271,7 +1271,7 @@ static void emit_diff_symbol_from_struct(struct diff_options *o,
1271 else if (c == '-')
1272 set = diff_get_color_opt(o, DIFF_FILE_OLD);
1273 }
1274 - emit_line_ws_markup(o, set, reset, line, len, set_sign, ' ',
1274 + emit_line_ws_markup(o, set_sign, set, reset, ' ', line, len,
1275 flags & (DIFF_SYMBOL_CONTENT_WS_MASK), 0);
1276 break;
1277 case DIFF_SYMBOL_PLUS:
@@ -1314,7 +1314,7 @@ static void emit_diff_symbol_from_struct(struct diff_options *o,
1314 set = diff_get_color_opt(o, DIFF_CONTEXT_BOLD);
1315 flags &= ~DIFF_SYMBOL_CONTENT_WS_MASK;
1316 }
1317 - emit_line_ws_markup(o, set, reset, line, len, set_sign, '+',
1317 + emit_line_ws_markup(o, set_sign, set, reset, '+', line, len,
1318 flags & DIFF_SYMBOL_CONTENT_WS_MASK,
1319 flags & DIFF_SYMBOL_CONTENT_BLANK_LINE_EOF);
1320 break;
@@ -1357,7 +1357,7 @@ static void emit_diff_symbol_from_struct(struct diff_options *o,
1357 else
1358 set = diff_get_color_opt(o, DIFF_CONTEXT_DIM);
1359 }
1360 - emit_line_ws_markup(o, set, reset, line, len, set_sign, '-',
1360 + emit_line_ws_markup(o, set_sign, set, reset, '-', line, len,
1361 flags & DIFF_SYMBOL_CONTENT_WS_MASK, 0);
1362 break;
1363 case DIFF_SYMBOL_WORDS_PORCELAIN: