Skip to content

Commit dac88ab

Browse files
dschoGit for Windows Build Agent
authored andcommitted
t5505/t5516: allow running without .git/branches/ in the templates
When we commit the template directory as part of `make vcxproj`, the `branches/` directory is not actually commited, as it is empty. Two tests were not prepared for that situation. This developer tried to get rid of the support for `.git/branches/` a long time ago, but that effort did not bear fruit, so the best we can do is work around in these here tests. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 902cb5b commit dac88ab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

t/t5505-remote.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in
11551155
(
11561156
cd six &&
11571157
git remote rm origin &&
1158-
mkdir .git/branches &&
1158+
mkdir -p .git/branches &&
11591159
echo "$origin_url#main" >.git/branches/origin &&
11601160
git remote rename origin origin &&
11611161
test_path_is_missing .git/branches/origin &&
@@ -1170,7 +1170,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'migrate a remote from named file in
11701170
(
11711171
cd seven &&
11721172
git remote rm origin &&
1173-
mkdir .git/branches &&
1173+
mkdir -p .git/branches &&
11741174
echo "quux#foom" > .git/branches/origin &&
11751175
git remote rename origin origin &&
11761176
test_path_is_missing .git/branches/origin &&

t/t5516-fetch-push.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches' '
933933
mk_empty testrepo &&
934934
git branch second $the_first_commit &&
935935
git checkout second &&
936-
mkdir testrepo/.git/branches &&
936+
mkdir -p testrepo/.git/branches &&
937937
echo ".." > testrepo/.git/branches/branch1 &&
938938
(
939939
cd testrepo &&
@@ -947,7 +947,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches' '
947947

948948
test_expect_success !WITH_BREAKING_CHANGES 'fetch with branches containing #' '
949949
mk_empty testrepo &&
950-
mkdir testrepo/.git/branches &&
950+
mkdir -p testrepo/.git/branches &&
951951
echo "..#second" > testrepo/.git/branches/branch2 &&
952952
(
953953
cd testrepo &&
@@ -964,7 +964,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'push with branches' '
964964
git checkout second &&
965965
966966
test_when_finished "rm -rf .git/branches" &&
967-
mkdir .git/branches &&
967+
mkdir -p .git/branches &&
968968
echo "testrepo" > .git/branches/branch1 &&
969969
970970
git push branch1 &&
@@ -980,7 +980,7 @@ test_expect_success !WITH_BREAKING_CHANGES 'push with branches containing #' '
980980
mk_empty testrepo &&
981981
982982
test_when_finished "rm -rf .git/branches" &&
983-
mkdir .git/branches &&
983+
mkdir -p .git/branches &&
984984
echo "testrepo#branch3" > .git/branches/branch2 &&
985985
986986
git push branch2 &&

0 commit comments

Comments
 (0)