chiark / gitweb /
dgit: Introduce "deliberatelies"
[dgit.git] / dgit
diff --git a/dgit b/dgit
index d2ca495a7871d493ebbb18bf63f8f73314bc42cb..7e642c037b8dedef77c9f62c9750efccf73fe5e4 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -51,6 +51,7 @@ our $buildproductsdir = '..';
 our $new_package = 0;
 our $ignoredirty = 0;
 our $rmonerror = 1;
+our @deliberatelies;
 our $existing_package = 'dpkg';
 our $cleanmode = 'dpkg-source';
 our $changes_since_version;
@@ -192,6 +193,10 @@ sub stat_exists ($) {
     die "stat $f: $!";
 }
 
+sub deliberately ($) {
+    return !!grep { $_[0] eq $_ } @deliberatelies;
+}
+
 #---------- remote protocol support, common ----------
 
 # remote push initiator/responder protocol:
@@ -1564,6 +1569,7 @@ sub push_mktag ($$$$$$$) {
     # We make the git tag by hand because (a) that makes it easier
     # to control the "tagger" (b) we can do remote signing
     my $authline = clogp_authline $clogp;
+    my $delibs = join(" ", "",@deliberatelies);
     open TO, '>', $tfn->('.tmp') or die $!;
     print TO <<END or die $!;
 object $head
@@ -1572,7 +1578,7 @@ tag $tag
 tagger $authline
 
 $package release $cversion for $clogsuite ($csuite) [dgit]
-[dgit distro=$distro]
+[dgit distro=$distro$delibs]
 END
     close TO or die $!;
 
@@ -2716,6 +2722,9 @@ sub parseopts () {
            } elsif (m/^--no-rm-on-error$/s) {
                push @ropts, $_;
                $rmonerror = 0;
+           } elsif (m/^--deliberately-($suite_re)$/s) {
+               push @ropts, $_;
+               push @deliberatelies, $&;
            } else {
                badusage "unknown long option \`$_'";
            }