This unbreak project-vc-dir for dirs under non-truename
hierarchies.
The following commit presumably makes 'M-x vc-dir' usable again
for versioned directories inside non-truename hierarchies,
commit e05fab5775
Author: Stephen Berman <stephen.berman@gmx.net>
Date: Sat May 2 15:11:37 2026 +0200
Fix 'vc-dir-resynch-file' (bug#80803)
* lisp/vc/vc-dir.el (vc-dir-resynch-file): Apply 'file-truename'
instead of 'expand-file-name' to FNAME argument to prevent
spurious display of symlinked files in *vc-dir* buffer.
However the similar command 'M-x project-vc-dir' was broken and made
unusable in similar circumstances.
This relatively simple fix addresses both situations touching only the
problematic 'vc-resynch-file' and one of its callees,
'vc-dir-recompute-file-state', which now discerns clearly between the
short/familiar name to present in the list and the "fname" to use to
call into the backend to gather the VC state. Since this function is
also called from another context, where the requirements are less clear,
keeping current smenatics in that situation seemed prudent, so the new
behaviour is activate with a new optional parameter.
* lisp/vc/vc-dir.el (vc-dir-resynch-file): Call
vc-dir-recompute-file-state with truename=t.
(vc-dir-recompute-file-state): Accept optional truename param.