Thread (30 messages) flat view 30 messages, 5 authors, 2021-02-12
STALE2016d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 03/12] test-lib-functions: move test_set_index_version() to its user

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-02-09 22:59:13
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 t/t2104-update-index-skip-worktree.sh | 5 +++++
 t/test-lib-functions.sh               | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t2104-update-index-skip-worktree.sh b/t/t2104-update-index-skip-worktree.sh
index 7e2e7dd4ae5..30666fc70d2 100755
--- a/t/t2104-update-index-skip-worktree.sh
+++ b/t/t2104-update-index-skip-worktree.sh
@@ -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
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index 0d40f8a598e..728bdf94684 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -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) {
-- 
2.30.0.284.gd98b1dd5eaa7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help