From: Yuya Nishihara <yuya@tcha.org>
To: 5297@debbugs.gnu.org
Cc: Yuya Nishihara <yuya@tcha.org>
Subject: bug#5297: [PATCH] vc: fixed test of symlinks on abbreviatable path
Date: Sun, 3 Jan 2010 23:05:06 +0900 [thread overview]
Message-ID: <201001032305.07014.yuya@tcha.org> (raw)
In-Reply-To: <201001031533.43703.yuya@tcha.org>
commit 51431c222c24bbe2919d3d98032f73723ebfccea
Author: Yuya Nishihara <yuya@tcha.org>
Date: Sun Jan 3 14:12:56 2010 +0900
vc: fixed test of symlinks on abbreviatable path
buffer-file-truename is *abbreviated* truename, but buffer-file-name seems not,
so we need to expand it.
With abbreviated file-name, at least, vc-git and vc-hg are not detected
as backend. This means symlinks to git/hg-managed files on HOME directory
are not handled by vc-find-file-hook.
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index fabb35f..238fafe 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -890,8 +890,9 @@ current, and kill the buffer that visits the link."
(set (make-local-variable 'backup-inhibited) t))
;; Let the backend setup any buffer-local things he needs.
(vc-call-backend backend 'find-file-hook))
- ((let ((link-type (and (not (equal buffer-file-name buffer-file-truename))
- (vc-backend buffer-file-truename))))
+ ((let* ((truename (expand-file-name buffer-file-truename))
+ (link-type (and (not (equal buffer-file-name truename))
+ (vc-backend truename))))
(cond ((not link-type) nil) ;Nothing to do.
((eq vc-follow-symlinks nil)
(message
next prev parent reply other threads:[~2010-01-03 14:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-03 6:33 bug#5297: 23.1; vc: fails to follow symlinks inside HOME Yuya Nishihara
2010-01-03 14:05 ` Yuya Nishihara [this message]
2012-12-01 13:26 ` bug#5297: [PATCH] vc: fixed test of symlinks on abbreviatable path Chong Yidong
2010-01-03 14:10 ` bug#5297: Re: 23.1; vc: fails to follow symlinks inside HOME Yuya Nishihara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001032305.07014.yuya@tcha.org \
--to=yuya@tcha.org \
--cc=5297@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).