Skip to content

Commit 6a67ad3

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 d2efb3e commit 6a67ad3

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
@@ -1145,7 +1145,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
11451145
(
11461146
cd six &&
11471147
git remote rm origin &&
1148-
mkdir .git/branches &&
1148+
mkdir -p .git/branches &&
11491149
echo "$origin_url#main" >.git/branches/origin &&
11501150
git remote rename origin origin &&
11511151
test_path_is_missing .git/branches/origin &&
@@ -1160,7 +1160,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
11601160
(
11611161
cd seven &&
11621162
git remote rm origin &&
1163-
mkdir .git/branches &&
1163+
mkdir -p .git/branches &&
11641164
echo "quux#foom" > .git/branches/origin &&
11651165
git remote rename origin origin &&
11661166
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
@@ -979,7 +979,7 @@ test_expect_success 'fetch with branches' '
979979
mk_empty testrepo &&
980980
git branch second $the_first_commit &&
981981
git checkout second &&
982-
mkdir testrepo/.git/branches &&
982+
mkdir -p testrepo/.git/branches &&
983983
echo ".." > testrepo/.git/branches/branch1 &&
984984
(
985985
cd testrepo &&
@@ -993,7 +993,7 @@ test_expect_success 'fetch with branches' '
993993

994994
test_expect_success 'fetch with branches containing #' '
995995
mk_empty testrepo &&
996-
mkdir testrepo/.git/branches &&
996+
mkdir -p testrepo/.git/branches &&
997997
echo "..#second" > testrepo/.git/branches/branch2 &&
998998
(
999999
cd testrepo &&
@@ -1010,7 +1010,7 @@ test_expect_success 'push with branches' '
10101010
git checkout second &&
10111011
10121012
test_when_finished "rm -rf .git/branches" &&
1013-
mkdir .git/branches &&
1013+
mkdir -p .git/branches &&
10141014
echo "testrepo" > .git/branches/branch1 &&
10151015
10161016
git push branch1 &&
@@ -1026,7 +1026,7 @@ test_expect_success 'push with branches containing #' '
10261026
mk_empty testrepo &&
10271027
10281028
test_when_finished "rm -rf .git/branches" &&
1029-
mkdir .git/branches &&
1029+
mkdir -p .git/branches &&
10301030
echo "testrepo#branch3" > .git/branches/branch2 &&
10311031
10321032
git push branch2 &&

0 commit comments

Comments
 (0)