]> git.ipfire.org Git - thirdparty/git.git/commit
t4034: fix use of one-shot variable assignment with shell function
authorEric Sunshine <sunshine@sunshineco.com>
Sat, 27 Jul 2024 05:35:06 +0000 (01:35 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 27 Jul 2024 05:49:40 +0000 (22:49 -0700)
commit5e91056a1b0d38c6b2149c2c3a72198720a1867f
tree6683015750079806bca789923002719f1f72b6dc
parenta26d7004f73abb1005acd98114faec3aa75f5090
t4034: fix use of one-shot variable assignment with shell function

The behavior of a one-shot environment variable assignment of the form
"VAR=val cmd" is unspecified according to POSIX when "cmd" is a shell
function. Indeed the behavior differs between shell implementations and
even different versions of the same shell, thus should be avoided.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4034-diff-words.sh