diff options
Diffstat (limited to 't/t3210-pack-refs.sh')
-rwxr-xr-x | t/t3210-pack-refs.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index f41b2afb99..577f32dc71 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -9,6 +9,9 @@ test_description='git pack-refs should not change the branch semantic This test runs git pack-refs and git show-ref and checks that the branch semantic is still the same. ' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh test_expect_success 'enable reflogs' ' @@ -135,7 +138,7 @@ test_expect_success 'delete ref with dangling packed version' ' git commit --allow-empty -m "future garbage" && git pack-refs --all && git reset --hard HEAD^ && - git checkout master && + git checkout main && git reflog expire --expire=all --all && git prune --expire=all && git branch -d lamb 2>result && @@ -240,7 +243,7 @@ test_expect_success 'retry acquiring packed-refs.lock' ' test_expect_success SYMLINKS 'pack symlinked packed-refs' ' # First make sure that symlinking works when reading: - git update-ref refs/heads/lossy refs/heads/master && + git update-ref refs/heads/lossy refs/heads/main && git for-each-ref >all-refs-before && mv .git/packed-refs .git/my-deviant-packed-refs && ln -s my-deviant-packed-refs .git/packed-refs && @@ -250,7 +253,7 @@ test_expect_success SYMLINKS 'pack symlinked packed-refs' ' git for-each-ref >all-refs-packed && test_cmp all-refs-before all-refs-packed && test -h .git/packed-refs && - test "$(readlink .git/packed-refs)" = "my-deviant-packed-refs" + test "$(test_readlink .git/packed-refs)" = "my-deviant-packed-refs" ' test_done |