From: Junio C Hamano Date: Thu, 24 Sep 2026 22:16:29 GMT Subject: Re: [RFC PATCH 3/3] setup: communicate why a directory is not a valid git directory Message-ID: In-Reply-To: <20260924120502.2642141-4-kaartic.sivaraam@gmail.com> Kaartic Sivaraam writes: > + strbuf_addf(&die_msg, _("not a git repository: '%s'"), gitdirenv); > + strbuf_addch(&die_msg, '\n'); > + strbuf_addf(&die_msg, _("reason: %s"), invalid_gitdir_reason.buf); > + die("%s", die_msg.buf); > + > + strbuf_release(&die_msg); You just called die(); nobody will execute this strbuf_release() for you, and because die() is marked with NORETURN, smart enough compilers would scold you for introducing dead code. Why are you lego-assembling localized message yourself, instead of doing something like ... die(_("not a git repository: '%s'\nreason: %s"), gitdirenv, invalid_gitdir_reason.buf); ... which is what is usually done?