From: Junio C Hamano Date: Mon, 06 Oct 2025 19:00:26 GMT Subject: Re: [PATCH v2 2/3] config: values of pathname type can be prefixed with :(optional) Message-ID: In-Reply-To: Phillip Wood writes: >> + test_config commit.template ":(optional)$PWD"/notexist && >> + ( >> + GIT_EDITOR="echo hello >\"\$1\"" && > > when git runs the editor this will be expanded to > > sh -c 'echo hello >"$1" "$@"' 'echo hello >"$1"' path/to/file > > I think it should be > > GIT_EDITOR="echo hello >" > > instead That's interesting in that I find it unusual. Fine as long as it works ;-) > Maybe I'm missing something but don't we want to ensure that we have a > non-empty message here? Also as it is a single command we can avoid > the subshell with > > GIT_EDITOR="echo hello >" git commit Yeah, that does sound better.