From: Jonas Rebmann Date: Tue, 24 Mar 2026 12:30:54 GMT Subject: Re: [PATCH v2 2/2] rev-parse: use selected alternate terms too look up refs Message-ID: <888f8670-856a-4ce7-8177-da78ba4f0c8a@schlaraffenlan.de> In-Reply-To: Hi Phillip, Thank you for your feedback, it will be addressed in v3. On 24/03/2026 11.49, Phillip Wood wrote: > If we fail to read the terms because there is no bisect in progress > then term_bad and term_good will be NULL and so the next line will > segfault. My understanding of read_bisect_terms() was that it never sets the terms to NULL, that if no bisect is in progress, .git/BISECT_TERMS does not exist, and the terms default to "good"/"bad" here in bisect.c: if (errno == ENOENT) { free(*read_bad); *read_bad = xstrdup("bad"); free(*read_good); *read_good = xstrdup("good"); return; } else { die_errno(_("could not read file '%s'"), filename); } So is a NULL-check really needed on caller end? Regards, Jonas