From: Ian Jackson Date: Sat, 7 Jan 2017 17:05:31 +0000 (+0000) Subject: dgit-badcommit-fixup: Do not investigate symrefs X-Git-Tag: archive/debian/3.0~97 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=8dd1a763317ffb423a6e08a118d638215946269d dgit-badcommit-fixup: Do not investigate symrefs Closes:#850547. Signed-off-by: Ian Jackson dgit-badcommit-fixup: * Do not investigate symrefs. Closes:#850547. --- diff --git a/debian/changelog b/debian/changelog index efb9c5b2..7d84c7bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,8 @@ dgit (2.17~) unstable; urgency=medium + dgit-badcommit-fixup: + * Do not investigate symrefs. Closes:#850547. + Test suite: * Internal improvements. * badcommit-rewrite: Fix operation using installed version of fixup. 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);