chiark / gitweb /
Tag change: Rename $tagformat to $tagformat_want
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 30 Jul 2016 11:49:50 +0000 (12:49 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 14 Aug 2016 17:40:07 +0000 (18:40 +0100)
No functional change.

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

diff --git a/dgit b/dgit
index bf0d6398431340e1ff53feea1e478e472f75bb39..65e8666cf3b2a4573918dfb8a98e6cf0eb02f067 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -65,7 +65,7 @@ our $quilt_modes_re = 'linear|smash|auto|nofix|nocheck|gbp|unapplied';
 our $we_are_responder;
 our $initiator_tempdir;
 our $patches_applied_dirtily = 00;
 our $we_are_responder;
 our $initiator_tempdir;
 our $patches_applied_dirtily = 00;
-our $tagformat;
+our $tagformat_want;
 our $tagformatfn;
 
 our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
 our $tagformatfn;
 
 our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
@@ -1241,24 +1241,24 @@ sub create_remote_git_repo () {
 
 sub select_tagformat () {
     # sets $tagformatfn
 
 sub select_tagformat () {
     # sets $tagformatfn
-    return if $tagformatfn && !$tagformat;
-    die 'bug' if $tagformatfn && $tagformat;
-    # ... $tagformat assigned after previous select_tagformat
+    return if $tagformatfn && !$tagformat_want;
+    die 'bug' if $tagformatfn && $tagformat_want;
+    # ... $tagformat_want assigned after previous select_tagformat
 
     my (@supported) = split /\,/, access_cfg('dgit-tag-format');
     printdebug "select_tagformat supported @supported\n";
 
 
     my (@supported) = split /\,/, access_cfg('dgit-tag-format');
     printdebug "select_tagformat supported @supported\n";
 
-    $tagformat //= [ $supported[0], "distro access configuration", 0 ];
-    printdebug "select_tagformat specified @$tagformat\n";
+    $tagformat_want //= [ $supported[0], "distro access configuration", 0 ];
+    printdebug "select_tagformat specified @$tagformat_want\n";
 
 
-    my ($fmt,$why,$override) = @$tagformat;
+    my ($fmt,$why,$override) = @$tagformat_want;
 
     fail "target distro supports tag formats @supported".
        " but have to use $fmt ($why)"
        unless $override
            or grep { $_ eq $fmt } @supported;
 
 
     fail "target distro supports tag formats @supported".
        " but have to use $fmt ($why)"
        unless $override
            or grep { $_ eq $fmt } @supported;
 
-    $tagformat = undef;
+    $tagformat_want = undef;
     $tagformatfn = ${*::}{"debiantag_$fmt"};
 
     fail "trying to use unknown tag format \`$fmt' ($why) !"
     $tagformatfn = ${*::}{"debiantag_$fmt"};
 
     fail "trying to use unknown tag format \`$fmt' ($why) !"
@@ -2382,9 +2382,9 @@ sub rpush_handle_protovsn_bothends () {
     if ($protovsn < 4) {
        fail "rpush negotiated protocol version $protovsn".
            " which supports old tag format only".
     if ($protovsn < 4) {
        fail "rpush negotiated protocol version $protovsn".
            " which supports old tag format only".
-           " but trying to use new format (".$tagformat->[1].")"
-           if $tagformat && $tagformat->[0] ne 'old';
-       $tagformat = ['old', "rpush negotiated protocol $protovsn", 0];
+           " but trying to use new format (".$tagformat_want->[1].")"
+           if $tagformat_want && $tagformat_want->[0] ne 'old';
+       $tagformat_want = ['old', "rpush negotiated protocol $protovsn", 0];
     }
     select_tagformat();
 }
     }
     select_tagformat();
 }
@@ -3844,7 +3844,7 @@ sub parseopts () {
            } elsif (m/^--dgit-tag-format=(old|new)$/s) {
                # undocumented, for testing
                push @ropts, $_;
            } elsif (m/^--dgit-tag-format=(old|new)$/s) {
                # undocumented, for testing
                push @ropts, $_;
-               $tagformat = [ $1, 'command line', 1 ];
+               $tagformat_want = [ $1, 'command line', 1 ];
                # 1 menas overrides distro configuration
            } elsif (m/^--always-split-source-build$/s) {
                # undocumented, for testing
                # 1 menas overrides distro configuration
            } elsif (m/^--always-split-source-build$/s) {
                # undocumented, for testing