test-lib-functions: move test_set_index_version() to its user

Move the test_set_index_version() function to its only user. This function has only been used in one place since its addition in 5d9fc888b48 (test-lib: allow setting the index format version, 2014-02-23). Let's have that test script define it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Feb 9, 2021 at 22:41 UTC 762ccf9906a946b4ba6d9a1b97b6a6b465f02ac3
2 files changed +5 -5
t/t2104-update-index-skip-worktree.sh
+5
@@ -9,6 +9,11 @@ test_description='skip-worktree bit test'
9
10 sane_unset GIT_TEST_SPLIT_INDEX
11
12 +test_set_index_version () {
13 + GIT_INDEX_VERSION="$1"
14 + export GIT_INDEX_VERSION
15 +}
16 +
17 test_set_index_version 3
18
19 cat >expect.full <<EOF
t/test-lib-functions.sh
-5
@@ -32,11 +32,6 @@ test_set_editor () {
32 export EDITOR
33 }
34
35 -test_set_index_version () {
36 - GIT_INDEX_VERSION="$1"
37 - export GIT_INDEX_VERSION
38 -}
39 -
35 test_decode_color () {
36 awk '
37 function name(n) {