Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2022-06-18 14:12:34 +0300
committerJunio C Hamano <gitster@pobox.com>2022-06-21 19:56:33 +0300
commitcfb19ae05f4565bc9d0a0cb3a23a3d2ab9fb8fab (patch)
tree3445b2aa7894bcf688a9cff79654e93cf6e2d2be /combine-diff.c
parente3d1be4237b831b517a54c70ae3c4ec3840345a4 (diff)
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>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 512897e3bf..76d2351fce 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -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)