Re: [PATCH 1/6] strbuf: add header for 'safe' API
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 23, 2026, 20:14 UTC
- Message-ID
- <xmqqzex7913p.fsf@gitster.g>
- In-Reply-To
- <DLMXXKPGU78J.2PBDFYJTPFTA4@fastmail.com>
"Mark C. Chu-Carroll" <markchucarroll@fastmail.com> writes:
Show 5 quoted lines
> General comment: I really like the idea of this. While I haven't > encountered this specific issue with git, I've dealt with similar issues > in other systems, and even if the cascading error case is rare, it's > incredibly frustrating to deal with the loss of error details because > they used unsafe operations to generate their messages!
If I understand correctly what this topic aims at, you'll see the "loss of error details" either way. Either we ran out of memory inside strbuf call and die, or we fail to allocate memory to format the details and end up not showing it.
Show 6 quoted lines
> On Fri Sep 18, 2026 at 9:02 AM EDT, Derrick Stolee via GitGitGadget wrote: >> From: Derrick Stolee <stolee@gmail.com> >> >> In particular, we cannot include 'banned-die.h' in 'strbuf.c'. > > I think we prefer to avoid "we" in these comments; and
The third word of your comment should not be "we" but "I", if that "we" intends to include me and others who wrote many commit log messages ;-)