git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] refs/files: deprecate writing symrefs as symbolic links

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2025, 20:54 UTC
Message-ID
<xmqqy0p1s5jh.fsf@gitster.g>
In-Reply-To
<xmqqo6q8uoon.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 33 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
>
>> 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>
>> ---
>> Hi,
>>
>> as discussed in [1], this small patch deprecates
>> "core.preferSymlinkRefs". Thanks!
>>
>> Changes in v2:
>>   - Tweaks for the deprecation announcement.
>>   - Use "textual symref format" instead of "symref format".
>>   - Warn after having created the symlink so that we don't drown out
>>     messages from `die()` that may have happened in
>>     `get_locked_file_path()`.
>>   - Link to v1: https://lore.kernel.org/r/20251014-pks-ref-files-deprecate-symbolic-links-v1-1-4bcd6a4ef6f5@pks.im
>
> Looking good.  Will replace.
Let me mark it for 'next'.
Thanks.
Previous: Junio C Hamano
Message 7 of 7 in “refs/files: deprecate writing symrefs as symbolic links”
  1. refs/files: deprecate writing symrefs as symbolic linksPatrick Steinhardt, Oct 14, 2025
  2. Junio C HamanoOct 14, 2025
  3. Patrick SteinhardtOct 15, 2025
  4. Junio C HamanoOct 15, 2025
  5. refs/files: deprecate writing symrefs as symbolic linksPatrick Steinhardt, Oct 15, 2025
  6. Junio C HamanoOct 15, 2025
  7. Junio C HamanoOct 23, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.