Re: [PATCH v2 2/3] config: values of pathname type can be prefixed with :(optional)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 6, 2025, 19:00 UTC
- Message-ID
- <xmqqzfa3onxx.fsf@gitster.g>
- In-Reply-To
- <a687ec17-8ee4-428e-bae5-063716d59a08@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 13 quoted lines
>> + 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 ;-)
Show 5 quoted lines
> 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.