From: Eric Sunshine Date: Sun, 04 Dec 2022 00:45:14 GMT Subject: Re: [PATCH v3 4/8] t/lib-patch-mode.sh: fix ignored exit codes Message-ID: In-Reply-To: On Fri, Dec 2, 2022 at 6:53 AM Ævar Arnfjörð Bjarmason wrote: > Fix code added in b319ef70a94 (Add a small patch-mode testing library, > 2009-08-13) to use &&-chaining and the newly added "test_cmp_cmd". > This avoids losing both the exit code of a "git" and the "cat" > processes. This still talks about test_cmp_cmd() which is no longer present in v3. > This fixes cases where we'd have e.g. missed memory leaks under > SANITIZE=leak, this code doesn't leak now as far as I can tell, but I > discovered it while looking at leaks in related code. > > The "cat _head >expect" here is redundant, we could simply give > "_head" to "test_cmp", but let's be consistent in using the "expect" > and "actual" names for clarity. > > Signed-off-by: Ævar Arnfjörð Bjarmason