]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test-lib-functions: move test_set_index_version() to its user
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 9 Feb 2021 21:41:50 +0000 (22:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Feb 2021 21:54:34 +0000 (13:54 -0800)
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>
t/t2104-update-index-skip-worktree.sh
t/test-lib-functions.sh

index 7e2e7dd4ae5842bc49ccaf5dc116deb3b3d6b993..30666fc70d28264d036105659871a68323ce2460 100755 (executable)
@@ -9,6 +9,11 @@ test_description='skip-worktree bit test'
 
 sane_unset GIT_TEST_SPLIT_INDEX
 
+test_set_index_version () {
+    GIT_INDEX_VERSION="$1"
+    export GIT_INDEX_VERSION
+}
+
 test_set_index_version 3
 
 cat >expect.full <<EOF
index 0d40f8a598ef94973ae5dca445c92209be25db2e..728bdf9468405e827f5b3fc19da8d29501f0ec18 100644 (file)
@@ -32,11 +32,6 @@ test_set_editor () {
        export EDITOR
 }
 
-test_set_index_version () {
-    GIT_INDEX_VERSION="$1"
-    export GIT_INDEX_VERSION
-}
-
 test_decode_color () {
        awk '
                function name(n) {