summaryrefslogtreecommitdiff
path: root/t/t6019-rev-list-ancestry-path.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t6019-rev-list-ancestry-path.sh')
-rwxr-xr-xt/t6019-rev-list-ancestry-path.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/t/t6019-rev-list-ancestry-path.sh b/t/t6019-rev-list-ancestry-path.sh
index beadaf6cca..20adbece65 100755
--- a/t/t6019-rev-list-ancestry-path.sh
+++ b/t/t6019-rev-list-ancestry-path.sh
@@ -21,6 +21,9 @@ test_description='--ancestry-path'
# --ancestry-path G..M -- G.t == L
# --ancestry-path --simplify-merges G^..M -- G.t == G L
+GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
+export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
+
. ./test-lib.sh
test_merge () {
@@ -128,29 +131,29 @@ test_expect_success 'setup criss-cross' '
(cd criss-cross &&
git init &&
test_commit A &&
- git checkout -b xb master &&
+ git checkout -b xb main &&
test_commit B &&
- git checkout -b xc master &&
+ git checkout -b xc main &&
test_commit C &&
git checkout -b xbc xb -- &&
git merge xc &&
git checkout -b xcb xc -- &&
git merge xb &&
- git checkout master)
+ git checkout main)
'
# no commits in bc descend from cb
test_expect_success 'criss-cross: rev-list --ancestry-path cb..bc' '
(cd criss-cross &&
git rev-list --ancestry-path xcb..xbc > actual &&
- test -z "$(cat actual)")
+ test_must_be_empty actual)
'
# no commits in repository descend from cb
test_expect_success 'criss-cross: rev-list --ancestry-path --all ^cb' '
(cd criss-cross &&
git rev-list --ancestry-path --all ^xcb > actual &&
- test -z "$(cat actual)")
+ test_must_be_empty actual)
'
test_done