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/t7407-submodule-foreach.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/t7407-submodule-foreach.sh')
-rwxr-xr-x | t/t7407-submodule-foreach.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/t/t7407-submodule-foreach.sh b/t/t7407-submodule-foreach.sh index 632defc53b..79981b51eb 100755 --- a/t/t7407-submodule-foreach.sh +++ b/t/t7407-submodule-foreach.sh @@ -9,7 +9,7 @@ This test verifies that "git submodule foreach" correctly visits all submodules that are currently checked out. ' -GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./test-lib.sh @@ -280,13 +280,13 @@ sub1sha1_short=$(cd clone3/sub1 && git rev-parse --short HEAD) sub2sha1_short=$(cd clone3/sub2 && git rev-parse --short HEAD) cat > expect <<EOF - $nested1sha1 nested1 (heads/master) - $nested2sha1 nested1/nested2 (heads/master) - $nested3sha1 nested1/nested2/nested3 (heads/master) - $submodulesha1 nested1/nested2/nested3/submodule (heads/master) + $nested1sha1 nested1 (heads/main) + $nested2sha1 nested1/nested2 (heads/main) + $nested3sha1 nested1/nested2/nested3 (heads/main) + $submodulesha1 nested1/nested2/nested3/submodule (heads/main) $sub1sha1 sub1 ($sub1sha1_short) $sub2sha1 sub2 ($sub2sha1_short) - $sub3sha1 sub3 (heads/master) + $sub3sha1 sub3 (heads/main) EOF test_expect_success 'test "status --recursive"' ' @@ -298,10 +298,10 @@ test_expect_success 'test "status --recursive"' ' ' cat > expect <<EOF - $nested1sha1 nested1 (heads/master) + $nested1sha1 nested1 (heads/main) +$nested2sha1 nested1/nested2 (file2~1) - $nested3sha1 nested1/nested2/nested3 (heads/master) - $submodulesha1 nested1/nested2/nested3/submodule (heads/master) + $nested3sha1 nested1/nested2/nested3 (heads/main) + $submodulesha1 nested1/nested2/nested3/submodule (heads/main) EOF test_expect_success 'ensure "status --cached --recursive" preserves the --cached flag' ' @@ -319,13 +319,13 @@ test_expect_success 'ensure "status --cached --recursive" preserves the --cached nested2sha1=$(git -C clone3/nested1/nested2 rev-parse HEAD) cat > expect <<EOF - $nested1sha1 ../nested1 (heads/master) + $nested1sha1 ../nested1 (heads/main) +$nested2sha1 ../nested1/nested2 (file2) - $nested3sha1 ../nested1/nested2/nested3 (heads/master) - $submodulesha1 ../nested1/nested2/nested3/submodule (heads/master) + $nested3sha1 ../nested1/nested2/nested3 (heads/main) + $submodulesha1 ../nested1/nested2/nested3/submodule (heads/main) $sub1sha1 ../sub1 ($sub1sha1_short) $sub2sha1 ../sub2 ($sub2sha1_short) - $sub3sha1 ../sub3 (heads/master) + $sub3sha1 ../sub3 (heads/main) EOF test_expect_success 'test "status --recursive" from sub directory' ' |