chiark / gitweb /
dgit-badcommit-fixup: Do update sameness filtering a bit later
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jan 2017 16:22:28 +0000 (16:22 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jan 2017 16:22:28 +0000 (16:22 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit-badcommit-fixup

index 08b6e37..ec6f57c 100755 (executable)
@@ -144,12 +144,13 @@ foreach my $rline (split /\n/, $refs) {
        warn "ref $refname refers to $type\n";
        next;
     }
-    next if $rewrite eq $obj;
     push @updates, [ $refname, $obj, $rewrite ];
 }
 
 our $worktree;
 
+@updates = grep { $_->[1] ne $_->[2] } @updates;
+
 #print Dumper(\@updates);
 
 open U, "|git update-ref -m 'dgit bad commit fixup' --stdin" or die $!;