]> git.ipfire.org Git - thirdparty/git.git/commit
test-lib-functions: mark 'test_commit' variables as 'local'
authorPhilippe Blain <levraiphilippeblain@gmail.com>
Fri, 21 Oct 2022 15:13:31 +0000 (15:13 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Oct 2022 20:51:05 +0000 (13:51 -0700)
commit455f0adf5709e24712bff725005ff1a59508a054
tree72fa2399e8575852f0f066a8d675711a597c657d
parent1fc3c0ad407008c2f71dd9ae1241d8b75f8ef886
test-lib-functions: mark 'test_commit' variables as 'local'

Some variables in 'test_commit' have names that are common enough that
it is very likely that test authors might use them in a test. If they do
so and use 'test_commit' between setting such a variable and using it,
the variable value from 'test_commit' will leak back into the test and
most likely break it.

Prevent that by marking all variables in 'test_commit' as 'local'. This
allow a subsequent commit to use a 'tag' variable.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib-functions.sh