Skip to content

Commit f6ab8ff

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 2a3d679 commit f6ab8ff

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
@@ -1039,7 +1039,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
10391039
(
10401040
cd six &&
10411041
git remote rm origin &&
1042-
mkdir .git/branches &&
1042+
mkdir -p .git/branches &&
10431043
echo "$origin_url#main" >.git/branches/origin &&
10441044
git remote rename origin origin &&
10451045
test_path_is_missing .git/branches/origin &&
@@ -1054,7 +1054,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
10541054
(
10551055
cd seven &&
10561056
git remote rm origin &&
1057-
mkdir .git/branches &&
1057+
mkdir -p .git/branches &&
10581058
echo "quux#foom" > .git/branches/origin &&
10591059
git remote rename origin origin &&
10601060
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
@@ -958,7 +958,7 @@ test_expect_success 'fetch with branches' '
958958
mk_empty testrepo &&
959959
git branch second $the_first_commit &&
960960
git checkout second &&
961-
mkdir testrepo/.git/branches &&
961+
mkdir -p testrepo/.git/branches &&
962962
echo ".." > testrepo/.git/branches/branch1 &&
963963
(
964964
cd testrepo &&
@@ -972,7 +972,7 @@ test_expect_success 'fetch with branches' '
972972

973973
test_expect_success 'fetch with branches containing #' '
974974
mk_empty testrepo &&
975-
mkdir testrepo/.git/branches &&
975+
mkdir -p testrepo/.git/branches &&
976976
echo "..#second" > testrepo/.git/branches/branch2 &&
977977
(
978978
cd testrepo &&
@@ -989,7 +989,7 @@ test_expect_success 'push with branches' '
989989
git checkout second &&
990990
991991
test_when_finished "rm -rf .git/branches" &&
992-
mkdir .git/branches &&
992+
mkdir -p .git/branches &&
993993
echo "testrepo" > .git/branches/branch1 &&
994994
995995
git push branch1 &&
@@ -1005,7 +1005,7 @@ test_expect_success 'push with branches containing #' '
10051005
mk_empty testrepo &&
10061006
10071007
test_when_finished "rm -rf .git/branches" &&
1008-
mkdir .git/branches &&
1008+
mkdir -p .git/branches &&
10091009
echo "testrepo#branch3" > .git/branches/branch2 &&
10101010
10111011
git push branch2 &&

0 commit comments

Comments
 (0)