A long, long, long time ago, we stored the "upstream" information of
branches in files inside the .git/branches/ directory. We don't do this
anymore, though. Since 5751f49010e (Move remote parsing into a library
file out of builtin-push., 2007-05-12), to be precise.

This is sort of a sibling to 75c384efb52 (Do not create $GIT_DIR/remotes/
directory anymore., 2006-12-19).

The tests t5505-remote and t5516-fetch-push need to be adjusted now, as
they expect to find a .git/branches/ directory.

This reverts c8a58ac5a52 (Revert "Don't create the $GIT_DIR/branches
directory on init", 2009-10-31).

Signed-off-by: Johannes Schindelin <[email protected]>
---
 t/t5505-remote.sh     | 2 ++
 t/t5516-fetch-push.sh | 4 ++++
 templates/branches--  | 1 -
 3 files changed, 6 insertions(+), 1 deletion(-)
 delete mode 100644 templates/branches--

diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index a6c0178f3af..4fd66760c75 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -830,6 +830,7 @@ test_expect_success 'migrate a remote from named file in 
$GIT_DIR/branches' '
        (
                cd six &&
                git remote rm origin &&
+               mkdir -p .git/branches &&
                echo "$origin_url" >.git/branches/origin &&
                git remote rename origin origin &&
                test_path_is_missing .git/branches/origin &&
@@ -844,6 +845,7 @@ test_expect_success 'migrate a remote from named file in 
$GIT_DIR/branches (2)'
        (
                cd seven &&
                git remote rm origin &&
+               mkdir .git/branches &&
                echo "quux#foom" > .git/branches/origin &&
                git remote rename origin origin &&
                test_path_is_missing .git/branches/origin &&
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 177897ea0b1..457f648ad91 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -866,6 +866,7 @@ test_expect_success 'fetch with branches' '
        mk_empty testrepo &&
        git branch second $the_first_commit &&
        git checkout second &&
+       mkdir -p testrepo/.git/branches &&
        echo ".." > testrepo/.git/branches/branch1 &&
        (
                cd testrepo &&
@@ -879,6 +880,7 @@ test_expect_success 'fetch with branches' '
 
 test_expect_success 'fetch with branches containing #' '
        mk_empty testrepo &&
+       mkdir -p testrepo/.git/branches &&
        echo "..#second" > testrepo/.git/branches/branch2 &&
        (
                cd testrepo &&
@@ -893,6 +895,7 @@ test_expect_success 'fetch with branches containing #' '
 test_expect_success 'push with branches' '
        mk_empty testrepo &&
        git checkout second &&
+       mkdir -p .git/branches &&
        echo "testrepo" > .git/branches/branch1 &&
        git push branch1 &&
        (
@@ -905,6 +908,7 @@ test_expect_success 'push with branches' '
 
 test_expect_success 'push with branches containing #' '
        mk_empty testrepo &&
+       mkdir -p .git/branches &&
        echo "testrepo#branch3" > .git/branches/branch2 &&
        git push branch2 &&
        (
diff --git a/templates/branches-- b/templates/branches--
deleted file mode 100644
index fae88709a63..00000000000
--- a/templates/branches--
+++ /dev/null
@@ -1 +0,0 @@
-: this is just to ensure the directory exists.
-- 
2.12.2.windows.2.800.gede8f145e06


Reply via email to