summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-23 16:47:29 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-24 01:50:22 +0100
commit18e3479f8737622d5e3ff964652dade72f82c897 (patch)
treeffbc3e5d5842d33b5305dc60b048097df6701510 /dgit
parentd6e357b6f8dae996d00fea732910d24ca82cea26 (diff)
Provide --force-unsupported-source-format
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit7
1 files changed, 5 insertions, 2 deletions
diff --git a/dgit b/dgit
index f821299..ea14ba5 100755
--- a/dgit
+++ b/dgit
@@ -74,7 +74,8 @@ our $tagformat_want;
our $tagformat;
our $tagformatfn;
-our %forceopts = map { $_=>0 } qw(unrepresentable);
+our %forceopts = map { $_=>0 }
+ qw(unrepresentable unsupported-source-format);
our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
@@ -1308,7 +1309,9 @@ sub get_archive_dsc () {
$dsc = parsecontrolfh($dscfh,$dscurl,1);
printdebug Dumper($dsc) if $debuglevel>1;
my $fmt = getfield $dsc, 'Format';
- fail "unsupported source format $fmt, sorry" unless $format_ok{$fmt};
+ $format_ok{$fmt} or forceable_fail [qw(unsupported-source-format)],
+ "unsupported source format $fmt, sorry";
+
$dsc_checked = !!$digester;
printdebug "get_archive_dsc: Version ".(getfield $dsc, 'Version')."\n";
return;