chiark / gitweb /
dgit: Make maybe_unapply_patches_again reset $patches_applied_dirtily
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 5d1a95c532a19c0c49f6c9538e227c732cc02b76..7ccaec422455a9b6b60374c4d2bb7241006f7775 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2650,11 +2650,13 @@ END
        create_remote_git_repo();
     }
 
-    my @pushrefs = $forceflag."HEAD:".rrref();
+    my @pushrefs = $forceflag.$dgithead.":".rrref();
     foreach my $tw (@tagwants) {
        my $view = $tw->{View};
        next unless $view eq 'dgit'
            or any { $_ eq $view } access_cfg_tagformats();
+           # ^ $view is "dgit" or "maint" so this looks for "maint"
+           # in archive supported tagformats.
        push @pushrefs, $forceflag."refs/tags/$tw->{Tag}";
     }
 
@@ -3882,6 +3884,7 @@ sub maybe_unapply_patches_again () {
        if $patches_applied_dirtily & 01;
     rmtree '.pc'
        if $patches_applied_dirtily & 02;
+    $patches_applied_dirtily = 0;
 }
 
 #----- other building -----