summaryrefslogtreecommitdiff
path: root/t/t4013/diff.diff_--stat_initial..side
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2026-08-12 08:03:19 +0000
committerJunio C Hamano <gitster@pobox.com>2026-08-12 09:05:50 -0700
commit211ba0c0c8e4c4e1e32ccfcd3ef70781ca12a1f3 (patch)
treec03c63c754829972107846b37088c5bdca000ac6 /t/t4013/diff.diff_--stat_initial..side
parent2f93092642c9c38d4cc4597d24be75a05a97011f (diff)
bisect: check get_terms return at all call sites
Six callers of get_terms() silently discard its return value. When get_terms fails (missing or truncated BISECT_TERMS file), the term strings remain NULL or empty, causing confusing downstream behavior: commands like "bisect next" or "bisect run" proceed with empty term strings, producing nonsensical ref names (refs/bisect/ with no suffix) and misleading error messages. Let's not discard the return value, but handle an error with the same message `bisect_terms()` already uses when reading the terms failed. Pointed out by Coverity. There is one slight complication here: One caller _needs_ the return value to indicate an error when the `BISECT_TERMS` file is absent, all the other call sites are totally okay with a "missing" `BISECT_TERMS` file. To address that, extend the function signature of `get_terms()` to indicate which behavior the caller wants. Assisted-by: Claude Opus 4.6 Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_--stat_initial..side')
0 files changed, 0 insertions, 0 deletions