X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit-badcommit-fixup;h=8b202c0ae9617883d31239f6758843122cd2ff5c;hp=a9a8f60f88aa94d7e459e968a091f826abcd955d;hb=3376567f79945be76fedff825e0512eebab311ef;hpb=e0feac940e7af31c5ddfa3c54b54567ef6632e4f diff --git a/dgit-badcommit-fixup b/dgit-badcommit-fixup index a9a8f60f..8b202c0a 100755 --- a/dgit-badcommit-fixup +++ b/dgit-badcommit-fixup @@ -231,9 +231,20 @@ foreach my $rline (split /\n/, $refs) { or die "$_ ?"; if ($refname eq 'refs/dgit-rewrite/map') { $org_rewrite_map = $obj; - continue; + next; } next if $refname =~ m{^refs/dgit-(?:badcommit|badfixuptest)/}; + + $!=0; $?=0; + system qw(sh -ec), + 'exec >/dev/null git symbolic-ref -q "$1"', qw(x), + $refname; + if ($?==0) { + $count{symrefs_ignored}++; + next; + } + die "$? $!" unless $?==256; + my $rewrite; if ($type eq 'commit') { $rewrite = rewrite_commit($obj); @@ -298,4 +309,7 @@ if ($real >= 0) { print "old values saved in refs/dgit-badcommit/\n" or die $!; } elsif ($real == 0) { print "testing output saved in refs/dgit-badfixuptest/\n" or die $!; +} else { + print STDERR "found work to do, exiting status 2\n"; + exit 2; }