]> git.ipfire.org Git - thirdparty/git.git/commit
test-lib: simplify leak-log checking
authorJeff King <peff@peff.net>
Wed, 1 Jan 2025 20:17:21 +0000 (15:17 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 Jan 2025 22:17:05 +0000 (14:17 -0800)
commit373a4326961c504ad6365fc1e4a9082e387499c7
treea7744c96e2f9567276a51d1263d5c3b031b9f879
parent5fa0c4dd296d3731bbbd1977d7bf9c50d8c4b7c1
test-lib: simplify leak-log checking

We have a function to count the number of leaks found (actually, it is
the number of processes which produced a log file). Once upon a time we
cared about seeing if this number increased between runs. But we
simplified that away in 95c679ad86 (test-lib: stop showing old leak
logs, 2024-09-24), and now we only care if it returns any results or
not.

In preparation for refactoring it further, let's drop the counting
function entirely, and roll it into the "is it empty" check. The outcome
should be the same, but we'll be free to return a boolean "did we find
anything" without worrying about somebody adding a new call to the
counting function.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh