From 5d9fc888b485caa1b6a95f2cb583dc26ab7e8d13 Mon Sep 17 00:00:00 2001 From: Thomas Gummerer Date: Sun, 23 Feb 2014 21:49:58 +0100 Subject: test-lib: allow setting the index format version Allow adding a TEST_GIT_INDEX_VERSION variable to config.mak to set the index version with which the test suite should be run. If it isn't set, the default version given in the source code is used (currently version 3). To avoid breakages with index versions other than [23], also set the index version under which t2104 is run to 3. This test only tests functionality specific to version 2 and 3 of the index file and would fail if the test suite is run with any other version. Helped-by: Junio C Hamano Signed-off-by: Thomas Gummerer Signed-off-by: Junio C Hamano --- t/test-lib-functions.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/test-lib-functions.sh') diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index aeae3ca769..0bf1e63ab5 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -32,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) { -- cgit v1.2.3