Subject: bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work.

From: Dmitry Gutov <[email-masked]>
Date: Wed, 26 Oct 2016 02:12:21 +0300

On 25.10.2016 22:05, Hong Xu wrote:

> I don't understand why find-alternate-file should be used.

For no reason other than the resulting command could be useful in more 
situations than just this one.

> The reason we
> used (vc-follow-link) is to pass the correct file path to
> vc-responsible-backend. I don't see how find-alternate-file can be used here.

It would open the file (or directory) than is the true name of the 
currently visited file (or directory), and kill the previous buffer.

vc-responsible-backend would be called with the true name automatically. 
This is close to what vc-follow-link does already.

But if that's definitely not what you want, how about a command like this?

(defun vc-refresh-as-link-target ()
   (interactive)
   (let ((buffer-file-name (file-truename buffer-file-name)))
     (vc-refresh-state)))

By the way, please remind us why vc-follow-symlinks (the variable) with 
the default value `ask' is not sufficient for you?

>> OK, mention where?
> In the doc string.

The docstring of what? Please be more precise, the less I have to think 
about or make choices regarding documentation, the happier I am.

> Maybe we should also mention `vc-responsible-backend'
> in the info doc "Supported Version Control Systems" in general.

Care to send the proposed addition in the form of a patch?