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>
This commit is contained in:
parent
cc46a74398
commit
471efb09aa
8
diff.c
8
diff.c
@ -2191,13 +2191,13 @@ static void diff_flush_raw(struct diff_filepair *p,
|
|||||||
free((void*)path_two);
|
free((void*)path_two);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void diff_flush_name(struct diff_filepair *p, int line_termination)
|
static void diff_flush_name(struct diff_filepair *p, struct diff_options *opt)
|
||||||
{
|
{
|
||||||
char *path = p->two->path;
|
char *path = p->two->path;
|
||||||
|
|
||||||
if (line_termination)
|
if (opt->line_termination)
|
||||||
path = quote_one(p->two->path);
|
path = quote_one(p->two->path);
|
||||||
printf("%s%c", path, line_termination);
|
printf("%s%c", path, opt->line_termination);
|
||||||
if (p->two->path != path)
|
if (p->two->path != path)
|
||||||
free(path);
|
free(path);
|
||||||
}
|
}
|
||||||
@ -2404,7 +2404,7 @@ static void flush_one_pair(struct diff_filepair *p, struct diff_options *opt)
|
|||||||
else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS))
|
else if (fmt & (DIFF_FORMAT_RAW | DIFF_FORMAT_NAME_STATUS))
|
||||||
diff_flush_raw(p, opt);
|
diff_flush_raw(p, opt);
|
||||||
else if (fmt & DIFF_FORMAT_NAME)
|
else if (fmt & DIFF_FORMAT_NAME)
|
||||||
diff_flush_name(p, opt->line_termination);
|
diff_flush_name(p, opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_file_mode_name(const char *newdelete, struct diff_filespec *fs)
|
static void show_file_mode_name(const char *newdelete, struct diff_filespec *fs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user