test-lib: allow setting the index format version
[gitweb.git] / t / test-lib-functions.sh
index 2f79146e6ce0c5df32845f7c9c0927cea133ad5f..0bf1e63ab5021349ae0b625e2ea3daf80b6d80b6 100644 (file)
@@ -1,4 +1,5 @@
-#!/bin/sh
+# Library of functions shared by all tests scripts, included by
+# test-lib.sh.
 #
 # Copyright (c) 2005 Junio C Hamano
 #
@@ -31,6 +32,11 @@ test_set_editor () {
        export EDITOR
 }
 
+test_set_index_version () {
+    GIT_INDEX_VERSION="$1"
+    export GIT_INDEX_VERSION
+}
+
 test_decode_color () {
        awk '
                function name(n) {