chiark / gitweb /
dgit-badcommit-fixup: Now seems to work
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jan 2017 18:09:27 +0000 (18:09 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 6 Jan 2017 18:32:14 +0000 (18:32 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit-badcommit-fixup

index 98720e5..72c719b 100755 (executable)
@@ -160,7 +160,12 @@ sub edit_rewrite_map ($) {
        close M or die $!;
     }
 
-    foreach my $up (@updates) {
+    foreach my $oldc (keys %memo) {
+       my $newc = $memo{$oldc};
+       next if $oldc eq $newc;
+       $map{$oldc} = $newc;
+    }
+    foreach my $up (@updates) { # catches tags
        $map{ $up->[1] } = $up->[2];
     }