]> Kevux Git Server - rit/commit
t7500: fix GIT_EDITOR shell snippet
authorJunio C Hamano <gitster@pobox.com>
Mon, 6 Oct 2025 20:07:18 +0000 (13:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 7 Oct 2025 17:05:40 +0000 (10:05 -0700)
commit6b4f07325d039db5b9a10a9228b4320ac1fc1dab
tree89a866322e0ef3f34f8e5f7d4fd1dad802a61cc8
parent666b29b58f7c95007fe0384737c1ff506b138136
t7500: fix GIT_EDITOR shell snippet

2140b140 (commit: error out for missing commit message template,
2011-02-25) defined

    GIT_EDITOR="echo hello >\"\$1\""

for these two tests, with the intention that 'hello' would be
written in the given file, but as Phillip Wood points out,
GIT_EDITOR is invoked by shell after getting expanded to

    sh -c 'echo hello >"$1" "$@"' 'echo hello >"$1"' path/to/file

which is not what we want.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7500-commit-template-squash-signoff.sh