Skip to content

Commit be4f0df

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
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 e30741e commit be4f0df

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

t/t5505-remote.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches' '
910910
(
911911
cd six &&
912912
git remote rm origin &&
913+
mkdir -p .git/branches &&
913914
echo "$origin_url" >.git/branches/origin &&
914915
git remote rename origin origin &&
915916
test_path_is_missing .git/branches/origin &&
@@ -924,6 +925,7 @@ test_expect_success 'migrate a remote from named file in $GIT_DIR/branches (2)'
924925
(
925926
cd seven &&
926927
git remote rm origin &&
928+
mkdir -p .git/branches &&
927929
echo "quux#foom" > .git/branches/origin &&
928930
git remote rename origin origin &&
929931
test_path_is_missing .git/branches/origin &&

t/t5516-fetch-push.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@ test_expect_success 'fetch with branches' '
866866
mk_empty testrepo &&
867867
git branch second $the_first_commit &&
868868
git checkout second &&
869+
mkdir -p testrepo/.git/branches &&
869870
echo ".." > testrepo/.git/branches/branch1 &&
870871
(
871872
cd testrepo &&
@@ -879,6 +880,7 @@ test_expect_success 'fetch with branches' '
879880

880881
test_expect_success 'fetch with branches containing #' '
881882
mk_empty testrepo &&
883+
mkdir -p testrepo/.git/branches &&
882884
echo "..#second" > testrepo/.git/branches/branch2 &&
883885
(
884886
cd testrepo &&
@@ -893,6 +895,7 @@ test_expect_success 'fetch with branches containing #' '
893895
test_expect_success 'push with branches' '
894896
mk_empty testrepo &&
895897
git checkout second &&
898+
mkdir -p .git/branches &&
896899
echo "testrepo" > .git/branches/branch1 &&
897900
git push branch1 &&
898901
(
@@ -905,6 +908,7 @@ test_expect_success 'push with branches' '
905908

906909
test_expect_success 'push with branches containing #' '
907910
mk_empty testrepo &&
911+
mkdir -p .git/branches &&
908912
echo "testrepo#branch3" > .git/branches/branch2 &&
909913
git push branch2 &&
910914
(

0 commit comments

Comments
 (0)