diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-04-21 09:34:23 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-04-22 15:53:36 -0700 |
| commit | 090af9957c14915461f302f422d2c147b3e9175b (patch) | |
| tree | 0c10ec63f8074ac9085b5f148b9860c990d27639 /t/t4013/diff.format-patch_--inline_--stdout_initial..master^ | |
| parent | 4f917bbf718047dc1b3c4346a9c47c84a52a810b (diff) | |
| download | git-090af9957c14915461f302f422d2c147b3e9175b.tar.gz git-090af9957c14915461f302f422d2c147b3e9175b.zip | |
t6002: fix use of `expr` with `set -e`
In `test_bisection_diff ()` we use `expr` to perform some math. This
command has some gotchas though in that it will only return success when
the result is neither null nor zero. In some of our cases though it
actually _is_ zero, and that will cause the expressions to fail once we
enable `set -e`.
Prepare for this change by instead using `$(( ))`, which doesn't have
the same issue. While at it, modernize the function a tiny bit.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.format-patch_--inline_--stdout_initial..master^')
0 files changed, 0 insertions, 0 deletions
