Set default diff output format after parsing command line
Initialize output_format to 0 instead of DIFF_FORMAT_RAW so that we can see later if any command line options changed it. Default value is set only if output format was not specified. Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
a610786f4b
commit
c9b5ef998a
@ -36,6 +36,9 @@ int cmd_diff_files(int argc, const char **argv, char **envp)
|
||||
usage(diff_files_usage);
|
||||
argv++; argc--;
|
||||
}
|
||||
if (!rev.diffopt.output_format)
|
||||
rev.diffopt.output_format = DIFF_FORMAT_RAW;
|
||||
|
||||
/*
|
||||
* Make sure there are NO revision (i.e. pending object) parameter,
|
||||
* rev.max_count is reasonable (0 <= n <= 3),
|
||||
|
Reference in New Issue
Block a user