Skip to content

Commit 4cc9d7a

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
fixup??? grep: honor sparse checkout patterns
This avoids breakages in t7817 when the default branch name is changed. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 368c43d commit 4cc9d7a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

t/t7817-grep-sparse-checkout.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ test_expect_success 'setup' '
7777
test_path_is_missing sub/A &&
7878
test_path_is_file a &&
7979
test_path_is_file sub/B/b &&
80-
test_path_is_file sub2/a
80+
test_path_is_file sub2/a &&
81+
git branch -m main
8182
'
8283

8384
# The two tests below check a special case: the sparsity patterns exclude '/b'
@@ -110,12 +111,12 @@ test_expect_success 'grep unmerged file despite not matching sparsity patterns'
110111
b:modified-b-in-branchY
111112
EOF
112113
test_when_finished "test_might_fail git merge --abort && \
113-
git checkout master" &&
114+
git checkout main" &&
114115
115116
git sparse-checkout disable &&
116-
git checkout -b branchY master &&
117+
git checkout -b branchY main &&
117118
test_commit modified-b-in-branchY b &&
118-
git checkout -b branchX master &&
119+
git checkout -b branchX main &&
119120
test_commit modified-b-in-branchX b &&
120121
121122
git sparse-checkout init &&

0 commit comments

Comments
 (0)