remote: announce removal of "branches/" and "remotes/"
Back when Git was in its infancy, remotes were configured via separate
files in "branches/" (back in 2005). This mechanism was replaced later
that year with the "remotes/" directory. Both mechanisms have eventually
been replaced by config-based remotes, and it is very unlikely that
anybody still uses these directories to configure their remotes.
Both of these directories have been marked as deprecated, one in 2005
and the other one in 2011. Follow through with the deprecation and
finally announce the removal of these features in Git 3.0.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
[jc: with a small tweak to the help message]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/t/t5515-fetch-merge-logic.sh b/t/t5515-fetch-merge-logic.sh
index 320d267..4e6026c 100755
--- a/t/t5515-fetch-merge-logic.sh
+++ b/t/t5515-fetch-merge-logic.sh
@@ -104,28 +104,31 @@
git config remote.config-glob.fetch refs/heads/*:refs/remotes/rem/* &&
remotes="$remotes config-glob" &&
- mkdir -p .git/remotes &&
- cat >.git/remotes/remote-explicit <<-\EOF &&
- URL: ../.git/
- Pull: refs/heads/main:remotes/rem/main
- Pull: refs/heads/one:remotes/rem/one
- Pull: two:remotes/rem/two
- Pull: refs/heads/three:remotes/rem/three
- EOF
- remotes="$remotes remote-explicit" &&
+ if test_have_prereq WITHOUT_BREAKING_CHANGES
+ then
+ mkdir -p .git/remotes &&
+ cat >.git/remotes/remote-explicit <<-\EOF &&
+ URL: ../.git/
+ Pull: refs/heads/main:remotes/rem/main
+ Pull: refs/heads/one:remotes/rem/one
+ Pull: two:remotes/rem/two
+ Pull: refs/heads/three:remotes/rem/three
+ EOF
+ remotes="$remotes remote-explicit" &&
- cat >.git/remotes/remote-glob <<-\EOF &&
- URL: ../.git/
- Pull: refs/heads/*:refs/remotes/rem/*
- EOF
- remotes="$remotes remote-glob" &&
+ cat >.git/remotes/remote-glob <<-\EOF &&
+ URL: ../.git/
+ Pull: refs/heads/*:refs/remotes/rem/*
+ EOF
+ remotes="$remotes remote-glob" &&
- mkdir -p .git/branches &&
- echo "../.git" > .git/branches/branches-default &&
- remotes="$remotes branches-default" &&
+ mkdir -p .git/branches &&
+ echo "../.git" > .git/branches/branches-default &&
+ remotes="$remotes branches-default" &&
- echo "../.git#one" > .git/branches/branches-one &&
- remotes="$remotes branches-one" &&
+ echo "../.git#one" > .git/branches/branches-one &&
+ remotes="$remotes branches-one"
+ fi &&
for remote in $remotes ; do
git config branch.br-$remote.remote $remote &&