diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-01-25 23:19:18 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-01-25 23:19:18 +0100 |
commit | 27d7c8599b159862762e2bd121c22d516fb04e90 (patch) | |
tree | 91bed47151791fe2e18e8e9e07a5d58207413bda /t/t1508-at-combinations.sh | |
parent | Merge branch 'dl/reflog-with-single-entry' (diff) | |
parent | tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed (diff) | |
download | git-27d7c8599b159862762e2bd121c22d516fb04e90.tar.xz git-27d7c8599b159862762e2bd121c22d516fb04e90.zip |
Merge branch 'js/default-branch-name-tests-final-stretch'
Prepare tests not to be affected by the name of the default branch
"git init" creates.
* js/default-branch-name-tests-final-stretch: (28 commits)
tests: drop prereq `PREPARE_FOR_MAIN_BRANCH` where no longer needed
t99*: adjust the references to the default branch name "main"
tests(git-p4): transition to the default branch name `main`
t9[5-7]*: adjust the references to the default branch name "main"
t9[0-4]*: adjust the references to the default branch name "main"
t8*: adjust the references to the default branch name "main"
t7[5-9]*: adjust the references to the default branch name "main"
t7[0-4]*: adjust the references to the default branch name "main"
t6[4-9]*: adjust the references to the default branch name "main"
t64*: preemptively adjust alignment to prepare for `master` -> `main`
t6[0-3]*: adjust the references to the default branch name "main"
t5[6-9]*: adjust the references to the default branch name "main"
t55[4-9]*: adjust the references to the default branch name "main"
t55[23]*: adjust the references to the default branch name "main"
t551*: adjust the references to the default branch name "main"
t550*: adjust the references to the default branch name "main"
t5503: prepare aligned comment for replacing `master` with `main`
t5[0-4]*: adjust the references to the default branch name "main"
t5323: prepare centered comment for `master` -> `main`
t4*: adjust the references to the default branch name "main"
...
Diffstat (limited to 't/t1508-at-combinations.sh')
-rwxr-xr-x | t/t1508-at-combinations.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/t/t1508-at-combinations.sh b/t/t1508-at-combinations.sh index e4521b7b97..87a4286414 100755 --- a/t/t1508-at-combinations.sh +++ b/t/t1508-at-combinations.sh @@ -1,6 +1,9 @@ #!/bin/sh test_description='test various @{X} syntax combinations together' +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME + . ./test-lib.sh check() { @@ -30,8 +33,8 @@ fail() { } test_expect_success 'setup' ' - test_commit master-one && - test_commit master-two && + test_commit main-one && + test_commit main-two && git checkout -b upstream-branch && test_commit upstream-one && test_commit upstream-two && @@ -47,7 +50,7 @@ test_expect_success 'setup' ' git checkout -b new-branch && test_commit new-one && test_commit new-two && - git branch -u master old-branch && + git branch -u main old-branch && git branch -u upstream-branch new-branch ' @@ -62,8 +65,8 @@ check "@{-1}@{1}" commit old-one check "@{u}" ref refs/heads/upstream-branch check "HEAD@{u}" ref refs/heads/upstream-branch check "@{u}@{1}" commit upstream-one -check "@{-1}@{u}" ref refs/heads/master -check "@{-1}@{u}@{1}" commit master-one +check "@{-1}@{u}" ref refs/heads/main +check "@{-1}@{u}@{1}" commit main-one check "@" commit new-two check "@@{u}" ref refs/heads/upstream-branch check "@@/at-test" ref refs/heads/@@/at-test @@ -100,14 +103,14 @@ check "@:normal" blob content check "@:fun@ny" blob content test_expect_success '@{1} works with only one reflog entry' ' - git checkout -B newbranch master && + git checkout -B newbranch main && git reflog expire --expire=now refs/heads/newbranch && git commit --allow-empty -m "first after expiration" && test_cmp_rev newbranch~ newbranch@{1} ' test_expect_success '@{0} works with empty reflog' ' - git checkout -B newbranch master && + git checkout -B newbranch main && git reflog expire --expire=now refs/heads/newbranch && test_cmp_rev newbranch newbranch@{0} ' |