[PATCH 2/2] combine-diff: abort if --output is given

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Signed-off-by: René Scharfe <l.s.r@xxxxxx>
---
 combine-diff.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/combine-diff.c b/combine-diff.c
index 11df1d7f39..b0ece95480 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)
--
2.36.1




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux