Merge branch 'ld/p4-case-fold'
[gitweb.git] / t / t1700-split-index.sh
index 94fb473e7c309b823a9abdc1e7c38b1299bf80f3..193d55c3f4486ce3515b261df0c7edf9b3e3fcbb 100755 (executable)
@@ -10,9 +10,18 @@ sane_unset GIT_TEST_SPLIT_INDEX
 test_expect_success 'enable split index' '
        git update-index --split-index &&
        test-dump-split-index .git/index >actual &&
+       indexversion=$(test-index-version <.git/index) &&
+       if test "$indexversion" = "4"
+       then
+               own=432ef4b63f32193984f339431fd50ca796493569
+               base=508851a7f0dfa8691e9f69c7f055865389012491
+       else
+               own=8299b0bcd1ac364e5f1d7768efb62fa2da79a339
+               base=39d890139ee5356c7ef572216cebcd27aa41f9df
+       fi &&
        cat >expect <<EOF &&
-own 8299b0bcd1ac364e5f1d7768efb62fa2da79a339
-base 39d890139ee5356c7ef572216cebcd27aa41f9df
+own $own
+base $base
 replacements:
 deletions:
 EOF
@@ -30,7 +39,7 @@ EOF
 
        test-dump-split-index .git/index | sed "/^own/d" >actual &&
        cat >expect <<EOF &&
-base 39d890139ee5356c7ef572216cebcd27aa41f9df
+base $base
 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0      one
 replacements:
 deletions:
@@ -182,7 +191,7 @@ test_expect_success 'unify index, two files remain' '
 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0      one
 100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0      two
 EOF
-       test_cmp ls-files.expect ls-files.actual
+       test_cmp ls-files.expect ls-files.actual &&
 
        test-dump-split-index .git/index | sed "/^own/d" >actual &&
        cat >expect <<EOF &&