diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-07 17:05:31 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-01-08 22:14:03 +0000 |
commit | 8dd1a763317ffb423a6e08a118d638215946269d (patch) | |
tree | a6fa8c9338dfb7561825032024f21c74b26fa9d9 /dgit-badcommit-fixup | |
parent | b8fdc166a58198ea1872bddb9163a1039668c9b8 (diff) |
dgit-badcommit-fixup: Do not investigate symrefs
Closes:#850547.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit-badcommit-fixup:
* Do not investigate symrefs. Closes:#850547.
Diffstat (limited to 'dgit-badcommit-fixup')
-rwxr-xr-x | dgit-badcommit-fixup | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dgit-badcommit-fixup b/dgit-badcommit-fixup index 0a1ebcf..8b202c0 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); |