@@ -25,7 +25,8 @@ pwdlen=$(echo "$pwd" | wc -c)
25
25
longpath=$( echo $longpath180 | cut -c 1-$(( 170 - $pwdlen )) )
26
26
27
27
test_expect_success ' submodule with a long path' '
28
- git init --bare remote &&
28
+ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
29
+ git -c init.defaultBranch=long init --bare remote &&
29
30
test_create_repo bundle1 &&
30
31
(
31
32
cd bundle1 &&
@@ -37,21 +38,22 @@ test_expect_success 'submodule with a long path' '
37
38
cd home &&
38
39
git clone ../remote test &&
39
40
cd test &&
41
+ git checkout -B long &&
40
42
git submodule add ../bundle1 $longpath &&
41
43
test_commit "sogood" &&
42
44
(
43
45
cd $longpath &&
44
46
git rev-parse --verify HEAD >actual &&
45
47
test_cmp ../../../expect actual
46
48
) &&
47
- git push origin master
49
+ git push origin long
48
50
) &&
49
51
mkdir home2 &&
50
52
(
51
53
cd home2 &&
52
54
git clone ../remote test &&
53
55
cd test &&
54
- git checkout master &&
56
+ git checkout long &&
55
57
git submodule update --init &&
56
58
(
57
59
cd $longpath &&
@@ -62,7 +64,8 @@ test_expect_success 'submodule with a long path' '
62
64
'
63
65
64
66
test_expect_success ' recursive submodule with a long path' '
65
- git init --bare super &&
67
+ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
68
+ git -c init.defaultBranch=long init --bare super &&
66
69
test_create_repo child &&
67
70
(
68
71
cd child &&
@@ -80,6 +83,7 @@ test_expect_success 'recursive submodule with a long path' '
80
83
cd home3 &&
81
84
git clone ../super test &&
82
85
cd test &&
86
+ git checkout -B long &&
83
87
git submodule add ../parent foo &&
84
88
git submodule update --init --recursive &&
85
89
test_commit "sogood" &&
@@ -88,7 +92,7 @@ test_expect_success 'recursive submodule with a long path' '
88
92
git rev-parse --verify HEAD >actual &&
89
93
test_cmp ../../../../expect actual
90
94
) &&
91
- git push origin master
95
+ git push origin long
92
96
) &&
93
97
mkdir home4 &&
94
98
(
0 commit comments