diff_flush_name(): take struct diff_options parameter.
Among the low-level output functions called from flush_one_pair(), this was the only function that did not take (filepair, options) as arguments. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Feb 9, 2007 at 22:18 UTC
471efb09aaa266e75e499829fc31a59337ef4a96
1 file changed
+4
-4
diff.c
+4
-4
@@ -2191,13 +2191,13 @@ static void diff_flush_raw(struct diff_filepair *p,
2191
free((void*)path_two);
2192
}
2193
2194
-static void diff_flush_name(struct diff_filepair *p, int line_termination)
2194
+static void diff_flush_name(struct diff_filepair *p, struct diff_options *opt)
2195
{
2196
char *path = p->two->path;
2197
2198
- if (line_termination)
2198
+ if (opt->line_termination)
2199
path = quote_one(p->two->path);
2200
- printf("%s%c", path, line_termination);
2200
+ printf("%s%c", path, opt->line_termination);
2201
if (p->two->path != path)
2202
free(path);
2203
}
@@ -2404,7 +2404,7 @@ static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt)
2404
else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS))
2405
diff_flush_raw(p, opt);
2406
else if (fmt & DIFF_FORMAT_NAME)
2407
- diff_flush_name(p, opt->line_termination);
2407
+ diff_flush_name(p, opt);
2408
}
2409
2410
static void show_file_mode_name(const char *newdelete, struct diff_filespec *fs)