mirror of
https://github.com/git/git.git
synced 2024-11-28 20:44:04 +08:00
combine-diff: abort if --output is given
The code for combined diffs currently only writes to stdout. Abort and report that fact instead of silently ignoring the --output option. The (empty) output file has already been created at that point, though. Reported-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
e3d1be4237
commit
cfb19ae05f
@ -1501,6 +1501,9 @@ void diff_tree_combined(const struct object_id *oid,
|
||||
if (opt->ignore_regex_nr)
|
||||
die("combined diff and '%s' cannot be used together",
|
||||
"--ignore-matching-lines");
|
||||
if (opt->close_file)
|
||||
die("combined diff and '%s' cannot be used together",
|
||||
"--output");
|
||||
|
||||
/* nothing to do, if no parents */
|
||||
if (!num_parent)
|
||||
|
Loading…
Reference in New Issue
Block a user