diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2020-11-19 00:44:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-20 00:44:18 +0100 |
commit | 01dc81336dc10c8f2350454c755a8a0ab676a9c9 (patch) | |
tree | 74230ac15a70592c4178ba53ceef337f5730dd2d /t/t7102-reset.sh | |
parent | t6[4-9]*: adjust the references to the default branch name "main" (diff) | |
download | git-01dc81336dc10c8f2350454c755a8a0ab676a9c9.tar.xz git-01dc81336dc10c8f2350454c755a8a0ab676a9c9.zip |
t7[0-4]*: adjust the references to the default branch name "main"
Carefully excluding t7064, which sees independent development elsewhere
at the time of writing, we use `main` as the default branch name in
t7[0-4]*. This trick was performed via
$ (cd t &&
sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \
-e 's/Master/Main/g' -- t7[0-4]*.sh &&
git checkout HEAD -- t7064\*)
This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main`
for those tests.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7102-reset.sh')
-rwxr-xr-x | t/t7102-reset.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/t7102-reset.sh b/t/t7102-reset.sh index 4af43d26f1..7d8fb188ee 100755 --- a/t/t7102-reset.sh +++ b/t/t7102-reset.sh @@ -7,7 +7,7 @@ test_description='git reset Documented tests for git reset' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -148,7 +148,7 @@ test_expect_success 'trying to do reset --soft with pending merge should fail' ' printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile && git commit -a -m "the change in branch2" && - git checkout master && + git checkout main && git branch -D branch1 branch2 && check_changes $head5 ' @@ -170,7 +170,7 @@ test_expect_success 'trying to do reset --soft with pending checkout merge shoul printf "1st line 2nd file\n2nd line 2nd file\n3rd line" >secondfile && git commit -a -m "the line in branch3" && - git checkout master && + git checkout main && git branch -D branch3 branch4 && check_changes $head5 ' @@ -383,7 +383,7 @@ test_expect_success '--hard reset to ORIG_HEAD should clear a fast-forward merge git reset --hard ORIG_HEAD && check_changes $head5 && - git checkout master && + git checkout main && git branch -D branch1 branch2 && check_changes $head5 ' |