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=935f5dff982ba6bddd21abbc5255691103a97238;hb=3ec15f5373c474cf3e0e55b876a565a09f81c793;hpb=7a3361bb3c0dab34d001bcda1c56ec42aec6e8b3 diff --git a/dgit-badcommit-fixup b/dgit-badcommit-fixup index 935f5dff..8b202c0a 100755 --- a/dgit-badcommit-fixup +++ b/dgit-badcommit-fixup @@ -234,6 +234,17 @@ foreach my $rline (split /\n/, $refs) { 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; }