summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/annotate-tests.sh3
-rwxr-xr-xt/t2400-worktree-add.sh4
-rwxr-xr-xt/t5318-commit-graph.sh3
-rwxr-xr-xt/t6001-rev-list-graft.sh1
-rwxr-xr-xt/t6101-rev-parse-parents.sh2
-rwxr-xr-xt/t8001-annotate.sh1
-rwxr-xr-xt/t8002-blame.sh1
-rwxr-xr-xt/t8012-blame-colors.sh1
8 files changed, 14 insertions, 2 deletions
diff --git a/t/annotate-tests.sh b/t/annotate-tests.sh
index 09e86f9..71f391f 100644
--- a/t/annotate-tests.sh
+++ b/t/annotate-tests.sh
@@ -149,7 +149,7 @@ test_expect_success 'blame evil merge' '
test_expect_success 'blame huge graft' '
test_when_finished "git checkout branch2" &&
- test_when_finished "rm -f .git/info/grafts" &&
+ test_when_finished "rm -rf .git/info" &&
graft= &&
for i in 0 1 2
do
@@ -164,6 +164,7 @@ test_expect_success 'blame huge graft' '
graft="$graft$commit " || return 1
done
done &&
+ mkdir .git/info &&
printf "%s " $graft >.git/info/grafts &&
check_count -h 00 01 1 10 1
'
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index 2f564d5..f3242fe 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -5,6 +5,7 @@ test_description='test git worktree add'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-rebase.sh
@@ -229,6 +230,7 @@ test_expect_success 'checkout with grafts' '
SHA1=$(git rev-parse HEAD) &&
test_commit def &&
test_commit xyz &&
+ mkdir .git/info &&
echo "$(git rev-parse HEAD) $SHA1" >.git/info/grafts &&
cat >expected <<-\EOF &&
xyz
@@ -559,6 +561,8 @@ test_expect_success 'git worktree --no-guess-remote option overrides config' '
'
post_checkout_hook () {
+ test_when_finished "rm -rf .git/hooks" &&
+ mkdir .git/hooks &&
test_hook -C "$1" post-checkout <<-\EOF
{
echo $*
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index fbf0d64..be0b564 100755
--- a/t/t5318-commit-graph.sh
+++ b/t/t5318-commit-graph.sh
@@ -361,13 +361,14 @@ test_expect_success 'replace-objects invalidates commit-graph' '
test_expect_success 'commit grafts invalidate commit-graph' '
cd "$TRASH_DIRECTORY" &&
test_when_finished rm -rf graft &&
- git clone full graft &&
+ git clone --template= full graft &&
(
cd graft &&
git commit-graph write --reachable &&
test_path_is_file .git/objects/info/commit-graph &&
H1=$(git rev-parse --verify HEAD~1) &&
H3=$(git rev-parse --verify HEAD~3) &&
+ mkdir .git/info &&
echo "$H1 $H3" >.git/info/grafts &&
git -c core.commitGraph=false log >expect &&
git -c core.commitGraph=true log >actual &&
diff --git a/t/t6001-rev-list-graft.sh b/t/t6001-rev-list-graft.sh
index 7294147..16635ec 100755
--- a/t/t6001-rev-list-graft.sh
+++ b/t/t6001-rev-list-graft.sh
@@ -99,6 +99,7 @@ do
"
test_expect_success 'with grafts' "
+ mkdir -p .git/info &&
echo '$B0 $A2' >.git/info/grafts &&
check $type $B2 -- $B2 $B1 $B0 $A2 $A1 $A0
"
diff --git a/t/t6101-rev-parse-parents.sh b/t/t6101-rev-parse-parents.sh
index c571fa5..5f55ab9 100755
--- a/t/t6101-rev-parse-parents.sh
+++ b/t/t6101-rev-parse-parents.sh
@@ -8,6 +8,7 @@ test_description='Test git rev-parse with different parent options'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
test_cmp_rev_output () {
@@ -25,6 +26,7 @@ test_expect_success 'setup' '
git merge -m next --allow-unrelated-histories start2 &&
test_commit final &&
+ mkdir .git/info &&
test_seq 40 |
while read i
do
diff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh
index a536a62..d7167f5 100755
--- a/t/t8001-annotate.sh
+++ b/t/t8001-annotate.sh
@@ -4,6 +4,7 @@ test_description='git annotate'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
PROG='git annotate'
diff --git a/t/t8002-blame.sh b/t/t8002-blame.sh
index ee4fdd8..0147de3 100755
--- a/t/t8002-blame.sh
+++ b/t/t8002-blame.sh
@@ -4,6 +4,7 @@ test_description='git blame'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
PROG='git blame -c'
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
index 90c75db..c3a5f6d 100755
--- a/t/t8012-blame-colors.sh
+++ b/t/t8012-blame-colors.sh
@@ -4,6 +4,7 @@ test_description='colored git blame'
GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+TEST_CREATE_REPO_NO_TEMPLATE=1
. ./test-lib.sh
PROG='git blame -c'