summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 11:56:46 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 20:08:38 +0000
commit7d3a474627f8d0d6803f34da4db51967fb1908f7 (patch)
treebbb56ff7fa23682fd255e0630e98cb65165e3694 /dgit
parentc0da0ec67ef131291f028c52652cd97b17bbdc10 (diff)
tainted-objects (cleanup): Check overrides first
This can save on a git-cat-file. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit6
1 files changed, 3 insertions, 3 deletions
diff --git a/dgit b/dgit
index faa4ed7..9ad9bc0 100755
--- a/dgit
+++ b/dgit
@@ -4566,6 +4566,9 @@ sub tainted_objects_precheck ($$) {
my ($json, $dgithead) = @_;
my %taints;
ROW: foreach my $row (@{ decode_json $json }) {
+ foreach my $override (@{ $row->{overrides} }) {
+ next ROW if grep { $_ eq $override } @deliberatelies;
+ }
my $objid = $row->{gitobjid};
my ($gtype, $dummy) = git_cat_file $objid, undef;
next if $gtype eq 'missing';
@@ -4574,9 +4577,6 @@ sub tainted_objects_precheck ($$) {
warning: server says object %s type %s is tainted, but here it has type %s
END
}
- foreach my $override (@{ $row->{overrides} }) {
- next ROW if grep { $_ eq $override } @deliberatelies;
- }
$taints{$objid}{Type} = $gtype;
push @{ $taints{$objid}{Rows} }, $row;
}