From: Ian Jackson Date: Thu, 5 Sep 2019 15:34:33 +0000 (+0100) Subject: dgit: Fail early when the archive/ tag already exists. X-Git-Tag: archive/debian/9.8~11 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=272a3704ff3cc3d3fbb2df40a953068160b9f44b dgit: Fail early when the archive/ tag already exists. Suggest using a new version number. We need a new --force option to override this check. Closes: #935802 Signed-off-by: Ian Jackson --- diff --git a/dgit b/dgit index 6f240ab0..56b2ee95 100755 --- a/dgit +++ b/dgit @@ -102,6 +102,7 @@ our %forceopts = map { $_=>0 } qw(unrepresentable unsupported-source-format dsc-changes-mismatch changes-origs-exactly uploading-binaries uploading-source-only + reusing-version import-gitapply-absurd import-gitapply-no-absurd import-dsc-with-dgit-field); @@ -4601,6 +4602,20 @@ END confess unless !!$made_split_brain == do_split_brain(); + my $tagname = debiantag_new $cversion, access_nomdistro(); + if (!(forceing[qw(reusing-version)]) && git_get_ref "refs/tags/$tagname") { + supplementary_message ''; + print STDERR f_ <