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>
This commit is contained in:

committed by
Junio C Hamano

parent
68f51871df
commit
8ccc75c245
@ -154,6 +154,31 @@ Cf. <xmqq1rjuz6n3.fsf_-_@gitster.c.googlers.com>,
|
||||
<CAKvOHKAFXQwt4D8yUCCkf_TQL79mYaJ=KAKhtpDNTvHJFuX1NA@mail.gmail.com>,
|
||||
<20230323204047.GA9290@coredump.intra.peff.net>,
|
||||
|
||||
* Support for storing shorthands for remote URLs in "$GIT_COMMON_DIR/branches/"
|
||||
and "$GIT_COMMON_DIR/remotes/" has been long superseded by storing remotes in
|
||||
the repository configuration.
|
||||
+
|
||||
The mechanism has originally been introduced in f170e4b39d ([PATCH] fetch/pull:
|
||||
short-hand notation for remote repositories., 2005-07-16) and was superseded by
|
||||
6687f8fea2 ([PATCH] Use .git/remote/origin, not .git/branches/origin.,
|
||||
2005-08-20), where we switched from ".git/branches/" to ".git/remotes/". That
|
||||
commit already mentions an upcoming deprecation of the ".git/branches/"
|
||||
directory, and starting with a1d4aa7424 (Add repository-layout document.,
|
||||
2005-09-01) we have also marked this layout as deprecated. Eventually we also
|
||||
started to migrate away from ".git/remotes/" in favor of config-based remotes,
|
||||
and we have marked the directory as legacy in 3d3d282146 (Documentation:
|
||||
Grammar correction, wording fixes and cleanup, 2011-08-23)
|
||||
+
|
||||
As our documentation mentions, these directories are not to be found in modern
|
||||
repositories at all and most users aren't even aware of these mechanisms. They
|
||||
have been deprecated for almost 20 years and 14 years respectively, and we are
|
||||
not aware of any active users that have complained about this deprecation.
|
||||
Furthermore, the ".git/branches/" directory is nowadays misleadingly named and
|
||||
may cause confusion as "branches" are almost exclusively used in the context of
|
||||
references.
|
||||
+
|
||||
These features will be removed.
|
||||
|
||||
== Superseded features that will not be deprecated
|
||||
|
||||
Some features have gained newer replacements that aim to improve the design in
|
||||
|
@ -153,7 +153,7 @@ config.worktree::
|
||||
linkgit:git-worktree[1]).
|
||||
|
||||
branches::
|
||||
A slightly deprecated way to store shorthands to be used
|
||||
A deprecated way to store shorthands to be used
|
||||
to specify a URL to 'git fetch', 'git pull' and 'git push'.
|
||||
A file can be stored as `branches/<name>` and then
|
||||
'name' can be given to these commands in place of
|
||||
@ -162,7 +162,8 @@ branches::
|
||||
and not likely to be found in modern repositories. This
|
||||
directory is ignored if $GIT_COMMON_DIR is set and
|
||||
"$GIT_COMMON_DIR/branches" will be used instead.
|
||||
|
||||
+
|
||||
Git will stop reading remotes from this directory in Git 3.0.
|
||||
|
||||
hooks::
|
||||
Hooks are customization scripts used by various Git
|
||||
@ -238,6 +239,8 @@ remotes::
|
||||
and not likely to be found in modern repositories. This
|
||||
directory is ignored if $GIT_COMMON_DIR is set and
|
||||
"$GIT_COMMON_DIR/remotes" will be used instead.
|
||||
+
|
||||
Git will stop reading remotes from this directory in Git 3.0.
|
||||
|
||||
logs::
|
||||
Records of changes made to refs are stored in this directory.
|
||||
|
Reference in New Issue
Block a user