On 2026-08-18 at 14:31:05, Junio C Hamano wrote: > Karthik Nayak writes: > > > Wouldn't it be better to notify the user that something went wrong > > rather than simply brush it off? > > If we were adding 'git config -e' today, absolutely. The issue is > not the comparison between signaling with an exit code and not > doing so. The question is whether the benefit or conceptual > correctness outweighs any possible downside of changing the > behavior existing users have grown accustomed to. > > Having said that, 'git config -e' is relatively new, introduced in > commit 3cbace5ee0 (builtin/config: introduce "edit" subcommand, > 2024-05-06). The folks who may be affected are those who used > 'git config -e' in their scripts and carefully checked the exit > status (or rather, lazily used 'set -e'), and did so in the past > two years. So the fallout might not be so great. I think we should propagate the error code. Other than ed(1) and POSIX vi(1) implementations, editors only exit nonzero when there's an error. If someone's scripting, then most of the major programming languages should not exit nonzero unless something seriously went wrong or the user requested a nonzero exit code, in which case they wanted the process to abort. I would actually argue that people might be ignoring errors with `set -e` that they intended to catch just because they're not getting a nonzero status code. -- brian m. carlson (they/them) Toronto, Ontario, CA