chiark / gitweb /
dgit: Introduce $protovsn 5; part of tidying up after tag format
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 11:56:55 +0000 (12:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 28 Jun 2019 15:01:33 +0000 (16:01 +0100)
This drops the tagformat param; the semantics are as if `new'
were specified.  Eventually, when we can drop support for
$protovsn 4, all traces of this parameter can then be gone.

No overall functional change.
No immediate compatibility implications.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index e179e3608abe1621aec27573fda68115e298574a..3b65a192c65c232d1ecd4d4fcea65d540ac29fd4 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -53,7 +53,7 @@ use Debian::Dgit;
 our $our_version = 'UNRELEASED'; ###substituted###
 our $absurdity = undef; ###substituted###
 
-our @rpushprotovsn_support = qw(4); # 4 is new tag format
+our @rpushprotovsn_support = qw(4 5); # 5 drops tag format specification
 our $protovsn;
 
 our $cmd;
@@ -465,7 +465,7 @@ sub branch_is_gdr ($) {
 #
 #  > param head DGIT-VIEW-HEAD
 #  > param csuite SUITE
-#  > param tagformat new              # $protovsn >= 4
+#  > param tagformat new              # $protovsn == 4
 #  > param maint-view MAINT-VIEW-HEAD
 #
 #  > param buildinfo-filename P_V_X.buildinfo   # zero or more times
@@ -4632,7 +4632,7 @@ ENDT
     responder_send_command("param head $dgithead");
     responder_send_command("param csuite $csuite");
     responder_send_command("param isuite $isuite");
-    responder_send_command("param tagformat new");
+    responder_send_command("param tagformat new"); # needed in $protovsn==4
     if (defined $maintviewhead) {
        responder_send_command("param maint-view $maintviewhead");
     }
@@ -5211,7 +5211,7 @@ sub i_want_signed_tag {
     my $maintview = $i_param{'maint-view'};
     die if defined $maintview && $maintview =~ m/[^0-9a-f]/;
 
-    if ($protovsn >= 4) {
+    if ($protovsn == 4) {
        my $p = $i_param{'tagformat'} // '<undef>';
        $p eq 'new'
            or badproto \*RO, "tag format mismatch: $p vs. new";