]> git.ipfire.org Git - thirdparty/git.git/commit
refs/files: deprecate writing symrefs as symbolic links
authorPatrick Steinhardt <ps@pks.im>
Wed, 15 Oct 2025 06:26:08 +0000 (08:26 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Oct 2025 16:11:08 +0000 (09:11 -0700)
commitf570bd91b3b2c6c5ef2035e3ce3ed76e613e74a7
tree0b8d2d0b7282b00064be165f1f92a8bb04e32d14
parentac7d021f0659f5a81be7b69a54a19c9618ce9dba
refs/files: deprecate writing symrefs as symbolic links

The "files" backend has the ability to store symbolic refs as symbolic
links, which can be configured via "core.preferSymlinkRefs". This
feature stems back from the early days: the initial implementation of
symbolic refs used symlinks exclusively. The symref format was only
introduced in 9b143c6e15 (Teach update-ref about a symbolic ref stored
in a textfile., 2005-09-25) and made the default in 9f0bb90d16
(core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02).

This is all about 20 years ago, and there are no known reasons nowadays
why one would want to use symlinks instead of symrefs. Mark the feature
for deprecation in Git 3.0.

Note that this only deprecates _writing_ symrefs as symbolic links.
Reading such symrefs is still supported for now.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/BreakingChanges.adoc
Documentation/config/core.adoc
refs/files-backend.c
t/t0600-reffiles-backend.sh