diff options
| author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2023-02-06 23:44:29 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-02-06 15:30:41 -0800 |
| commit | 62f3a45bb49f9436f1cd754b02ac549b1f6514cf (patch) | |
| tree | 1659454b51ffdb1dd6415f130b4843b21d666961 /commit-slab.h | |
| parent | auto-crlf tests: don't lose exit code in loops and outside tests (diff) | |
| download | git-62f3a45bb49f9436f1cd754b02ac549b1f6514cf.tar.gz git-62f3a45bb49f9436f1cd754b02ac549b1f6514cf.zip | |
t/lib-patch-mode.sh: fix ignored exit codes
Fix code added in b319ef70a94 (Add a small patch-mode testing library,
2009-08-13) to use &&-chaining.
This avoids losing both the exit code of a "git" and the "cat"
processes.
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.
For "verify_saved_head()" we could make use of "test_cmp_rev" with
some changes, but it uses "git rev-parse --verify", and this existing
test does not. I think it could safely use it, but let's avoid the
while-at-it change, and narrowly fix the exit code problem.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-slab.h')
0 files changed, 0 insertions, 0 deletions
