summaryrefslogtreecommitdiff
path: root/t/t2107-update-index-basic.sh
diff options
context:
space:
mode:
authorDavid Turner <dturner@twopensource.com>2016-02-24 17:59:04 -0500
committerJunio C Hamano <gitster@pobox.com>2016-02-25 16:01:05 -0800
commitb5038b0f6068ac6ac1d389494cf8e954e477a56e (patch)
tree9823a829f08f02886ada940f0e833e152dfbd7eb /t/t2107-update-index-basic.sh
parentecbe0284c5e251a376c5e6ab3affe3f033e04efa (diff)
downloadgit-b5038b0f6068ac6ac1d389494cf8e954e477a56e.tar.gz
tests: add ref-storage argument
Add a --ref-storage argument to make it easy to test alternate ref storage backends. This means that every test that calls git init or git clone must use the new ref storage argument. Modify many tests to work under alternate ref storage backends. Introduce abstractions for raw ref/reflog reading/writing in tests instead of directly frobbing the filesystem. Conditionally skip tests that are not expected to succeed under this condition. Most of this is straightforward. Of particular note are the following test changes: * The rearrangement of commands in t1401 is because without HEAD in the right place, git doesn't recognized the trash dir as a git repo, so no git commands work. * t1430-bad-ref-name specifically blocks lmdb because other alternate backends might want to keep this test. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2107-update-index-basic.sh')
-rwxr-xr-xt/t2107-update-index-basic.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh
index dfe02f4818..b00adef399 100755
--- a/t/t2107-update-index-basic.sh
+++ b/t/t2107-update-index-basic.sh
@@ -22,7 +22,7 @@ test_expect_success 'update-index -h with corrupt index' '
mkdir broken &&
(
cd broken &&
- git init &&
+ git init $ref_storage_arg &&
>.git/index &&
test_expect_code 129 git update-index -h >usage 2>&1
) &&
@@ -43,7 +43,7 @@ test_expect_success '--cacheinfo does not accept blob null sha1' '
'
test_expect_success '--cacheinfo does not accept gitlink null sha1' '
- git init submodule &&
+ git init submodule $ref_storage_arg &&
(cd submodule && test_commit foo) &&
git add submodule &&
git rev-parse :submodule >expect &&
@@ -70,7 +70,7 @@ test_expect_success '.lock files cleaned up' '
(
cd cleanup &&
mkdir worktree &&
- git init repo &&
+ git init $ref_storage_arg repo &&
cd repo &&
git config core.worktree ../../worktree &&
# --refresh triggers late setup_work_tree,