Subject: Re: [PATCH] whitespace: symbolic links usually lack LF at the end

From: Junio C Hamano <[email-masked]>
Date: Thu, 05 Feb 2026 07:50:55 -0800

Patrick Steinhardt <[email-masked]> writes:

> I'd suggest that we only disable this check in case either:
>
>   - One side doesn't exist, the other is a symbolic link.
>
>   - Both sides are a symbolic link.

Hmm.  That is indeed a thoguht.  But we do not want to complain in
text-to-symlink transition that postimage lacks the terminating LF,
so the above rules may be a good start but will need further
tweaking, I am afraid.

> Another question is whether we support symref targets that end in a
> newline. I guess the answer is going to be some form of "yes", and in
> that case we could of course loose some information. But honestly, this
> is so much of an edge case that I don't really worry about it too much.

Do we track, apply and diff any symrefs?  I thought that we do not
touch anything inside .git/ and symrefs live inside .git/refs/
(except for .git/HEAD)?