X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=dgit-badcommit-fixup;h=8b202c0ae9617883d31239f6758843122cd2ff5c;hp=0a1ebcf61ef208a3b26f36a145ab24cfd53120a7;hb=71437159c44af0328fc4bbc1826be18e4f057444;hpb=9ceee050983cec221d82053c3e6f6bbbd9ca5f2c diff --git a/dgit-badcommit-fixup b/dgit-badcommit-fixup index 0a1ebcf6..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);