From: Harald Nordgren Date: Thu, 03 Sep 2026 14:45:53 GMT Subject: Re: [PATCH v4 1/2] stash: reserve exit status 1 for conflicts Message-ID: In-Reply-To: <002b1324-0f7f-45ec-9f67-624a41801ff7@gmail.com> > >> + if (fn) { > >> + ret = fn(argc, argv, prefix, repo); > >> + > >> + /* > >> + * The subcommand implementations return 0 on success, a > >> + * negative value on failure, and STASH_APPLY_CONFLICT > >> + * when applying a stash entry resulted in conflicts. > >> + * Map failures to 128, the status die() uses, so that > >> + * exit status 1 unambiguously indicates conflicts. > >> + */ > >> + if (ret < 0) > >> + return 128; > >> + return ret; > >> + } else if (!argc) > >> return !!push_stash_unassumed(0, NULL, prefix, repo); > > > > Style. Once one of "if", "else if" and "else" cascade gains > > {braches}, others should do so as well. I would love to have a linter rule for this, since I keep forgetting and it's a waste of time for others to remind me. Maybe we should copy this over from Linux? https://github.com/torvalds/linux/blob/v7.2/scripts/checkpatch.pl#L6270 Harald