Skip to content

Commit f1f23e4

Browse files
committed
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 1b42afc commit f1f23e4

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
@@ -1040,7 +1040,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
10401040
(
10411041
cd six &&
10421042
git remote rm origin &&
1043-
mkdir .git/branches &&
1043+
mkdir -p .git/branches &&
10441044
echo "$origin_url#main" >.git/branches/origin &&
10451045
git remote rename origin origin &&
10461046
test_path_is_missing .git/branches/origin &&
@@ -1055,7 +1055,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
10551055
(
10561056
cd seven &&
10571057
git remote rm origin &&
1058-
mkdir .git/branches &&
1058+
mkdir -p .git/branches &&
10591059
echo "quux#foom" > .git/branches/origin &&
10601060
git remote rename origin origin &&
10611061
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
@@ -980,7 +980,7 @@ test_expect_success 'fetch with branches' '
980980
mk_empty testrepo &&
981981
git branch second $the_first_commit &&
982982
git checkout second &&
983-
mkdir testrepo/.git/branches &&
983+
mkdir -p testrepo/.git/branches &&
984984
echo ".." > testrepo/.git/branches/branch1 &&
985985
(
986986
cd testrepo &&
@@ -994,7 +994,7 @@ test_expect_success 'fetch with branches' '
994994

995995
test_expect_success 'fetch with branches containing #' '
996996
mk_empty testrepo &&
997-
mkdir testrepo/.git/branches &&
997+
mkdir -p testrepo/.git/branches &&
998998
echo "..#second" > testrepo/.git/branches/branch2 &&
999999
(
10001000
cd testrepo &&
@@ -1011,7 +1011,7 @@ test_expect_success 'push with branches' '
10111011
git checkout second &&
10121012
10131013
test_when_finished "rm -rf .git/branches" &&
1014-
mkdir .git/branches &&
1014+
mkdir -p .git/branches &&
10151015
echo "testrepo" > .git/branches/branch1 &&
10161016
10171017
git push branch1 &&
@@ -1027,7 +1027,7 @@ test_expect_success 'push with branches containing #' '
10271027
mk_empty testrepo &&
10281028
10291029
test_when_finished "rm -rf .git/branches" &&
1030-
mkdir .git/branches &&
1030+
mkdir -p .git/branches &&
10311031
echo "testrepo#branch3" > .git/branches/branch2 &&
10321032
10331033
git push branch2 &&

0 commit comments

Comments
 (0)