summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 19:21:40 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-28 20:08:38 +0000
commit3e7cd04f77b979446722f77671b6628c09d6489c (patch)
tree866d314df1e219747488101ce6de7c4d533e80f9
parent95dc0dca301a9b95bb5fdb3c18bd5f1c4908407e (diff)
tainted-objects (cleanup): Do hint addition in common message prep
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--Debian/Dgit.pm9
-rwxr-xr-xdgit6
-rwxr-xr-xinfra/dgit-repos-policy-debian5
3 files changed, 11 insertions, 9 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm
index 7a4d76e..d9d7c37 100644
--- a/Debian/Dgit.pm
+++ b/Debian/Dgit.pm
@@ -952,8 +952,8 @@ sub reflog_cache_lookup ($$) {
return undef;
}
-sub tainted_objects_message ($$) {
- my ($ti, $override_status) = @_;
+sub tainted_objects_message ($$$) {
+ my ($ti, $override_status, $hinted_dedup) = @_;
# $override_status:
# undef, not overriddeable
# '', not overridden
@@ -993,6 +993,11 @@ END
Forcing due to %s
END
+ my $hint = $ti->{hint};
+ if (defined $hint and !$hinted_dedup->{$hint}++) {
+ $msg .= $hint;
+ }
+
return $msg;
}
diff --git a/dgit b/dgit
index 10773dc..06e973a 100755
--- a/dgit
+++ b/dgit
@@ -4602,12 +4602,8 @@ END
my $ovstatus =
(grep m{^--deliberately-}, @{ $row->{overrides} })
? '' : undef;
- print STDERR tainted_objects_message $row, $ovstatus;
+ print STDERR tainted_objects_message $row, $ovstatus, \%hinted;
$trouble = 1;
- my $hint = $row->{hint};
- if (defined $hint and !$hinted{$hint}++) {
- print STDERR $hint;
- }
}
};
my $c_commit;
diff --git a/infra/dgit-repos-policy-debian b/infra/dgit-repos-policy-debian
index 86794f5..81f8d45 100755
--- a/infra/dgit-repos-policy-debian
+++ b/infra/dgit-repos-policy-debian
@@ -445,6 +445,7 @@ END
END
my $mustreject=0;
+ my %hinted;
while (my $taintid = shift @taintids) {
$!=0; $_ = <CHKOUT>;
@@ -492,11 +493,11 @@ END
$untaintq->execute($taintid);
}
- $stderr .= tainted_objects_message {
+ $stderr .= tainted_objects_message({
%$ti,
gitobjid => $objid,
gitobjtype => $objtype,
- }, $ovstatus;
+ }, $ovstatus, \%hinted);
}
close CHKOUT;