From: Patrick Steinhardt Date: Wed, 15 Jul 2026 06:58:18 GMT Subject: Re: [PATCH 02/11] config: propagate launch_editor() failure in show_editor() Message-ID: In-Reply-To: <0692704d45060a62579b50dd7a2f07da04f435c8.1784069325.git.gitgitgadget@gmail.com> On Tue, Jul 14, 2026 at 10:48:35PM +0000, Johannes Schindelin via GitGitGadget wrote: > diff --git a/builtin/config.c b/builtin/config.c > index 8d8ec0beea..1307fdb0d6 100644 > --- a/builtin/config.c > +++ b/builtin/config.c > @@ -1313,7 +1313,10 @@ static int show_editor(struct config_location_options *opts) > else if (errno != EEXIST) > die_errno(_("cannot create configuration file %s"), config_file); > } > - launch_editor(config_file, NULL, NULL); > + if (launch_editor(config_file, NULL, NULL)) { > + free(config_file); > + return -1; > + } All error paths in `launch_editor()` already print an error message, so we indeed don't have to do anything but bubble up the error here. Patrick