From 4d113afe3aee58adf0d76f3d48610b6f7d1c6739 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 5 Sep 2019 14:48:19 +0100 Subject: [PATCH] dgit: Warn when we see what look like our options passed too late Closes: #934807 Signed-off-by: Ian Jackson --- dgit | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/dgit b/dgit index 962bca1a..6f240ab0 100755 --- a/dgit +++ b/dgit @@ -6679,6 +6679,31 @@ sub build_prep ($) { } } +sub maybe_warn_opt_confusion ($$$) { + my ($subcommand, $willrun, $optsref) = @_; + foreach (@$optsref) { + if (m/^(?: --dry-run $ + | --damp-run $ + | --clean= | -w[gcnd] + | --(?:include|ignore)-dirty$ + | --quilt= | --gbp$ | --dpm$ | --baredebian + | --split-view= + | --build-products-dir= + )/x) { + print STDERR f_ <