GNU bug report logs - #21535
25.0.50; vc-follow-symlinks=ask is ineffective for directory links

Previous Next

Package: emacs;

Reported by: Johan Bockgård <bojohan <at> gnu.org>

Date: Tue, 22 Sep 2015 20:01:02 UTC

Severity: normal

Found in version 25.0.50

To reply to this bug, email your comments to 21535 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#21535; Package emacs. (Tue, 22 Sep 2015 20:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Johan Bockgård <bojohan <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 22 Sep 2015 20:01:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Johan Bockgård <bojohan <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; vc-follow-symlinks=ask is ineffective for directory links
Date: Tue, 22 Sep 2015 22:00:44 +0200
When `vc-follow-symlinks' is `ask' (the default) Emacs follows links for
files under version control, but fails to ask before doing so when any
parent directory is a symlink.

E.g.
/x/y/link  (asks)
/x/link/z  (doesn't ask)

The following commit changed two occurrences of `file-chase-links' to
`buffer-file-truename' in vc-hooks.el. A third occurrence of
file-chase-links was left alone however, which fools the querying logic
for files where the directory part of the name contains symlinks.


commit 33f95a82e97cac000a98dc5b1100ad7a095e12d3
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date:   Sat Nov 22 05:23:42 2008 +0000

    (vc-follow-link, vc-find-file-hook):
    Use buffer-file-truename to handle symlinks in any part of the filename.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21535; Package emacs. (Thu, 03 Dec 2020 11:03:01 GMT) Full text and rfc822 format available.

Message #8 received at 21535 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Johan Bockgård <bojohan <at> gnu.org>
Cc: 21535 <at> debbugs.gnu.org
Subject: Re: bug#21535: 25.0.50; vc-follow-symlinks=ask is ineffective for
 directory links
Date: Thu, 03 Dec 2020 12:01:54 +0100
Johan Bockgård <bojohan <at> gnu.org> writes:

> When `vc-follow-symlinks' is `ask' (the default) Emacs follows links for
> files under version control, but fails to ask before doing so when any
> parent directory is a symlink.
>
> E.g.
> /x/y/link  (asks)
> /x/link/z  (doesn't ask)
>
> The following commit changed two occurrences of `file-chase-links' to
> `buffer-file-truename' in vc-hooks.el. A third occurrence of
> file-chase-links was left alone however, which fools the querying logic
> for files where the directory part of the name contains symlinks.

(This bug report unfortunately got no response at the time.)

Some work has been done on vc/symlinks since this bug was reported, so
this may or may not have been fixed in the development version of
Emacs.  Are you still seeing this there?

If so, could you provide a script that sets up a directory structure
that demonstrates the bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 03 Dec 2020 11:03:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21535; Package emacs. (Sun, 06 Dec 2020 22:56:01 GMT) Full text and rfc822 format available.

Message #13 received at 21535 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 21535 <at> debbugs.gnu.org, Johan Bockgård <bojohan <at> gnu.org>
Subject: Re: bug#21535: 25.0.50;
 vc-follow-symlinks=ask is ineffective for directory links
Date: Sun, 06 Dec 2020 17:55:07 -0500
Maybe:

cd /tmp
mkdir git
cd git
touch 1
git init
git add .
git commit -m "c1"
cd /tmp
ln -s git/1
ln -s git git2

emacs -Q /tmp/1
 -> "Symbolic link to Git-controlled source file; follow link?"

emacs -Q /tmp/git2/1
 -> no prompt

I don't think I see why that matters though, so maybe not the right example.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#21535; Package emacs. (Mon, 07 Dec 2020 14:58:02 GMT) Full text and rfc822 format available.

Message #16 received at 21535 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 21535 <at> debbugs.gnu.org, Johan Bockgård <bojohan <at> gnu.org>
Subject: Re: bug#21535: 25.0.50; vc-follow-symlinks=ask is ineffective for
 directory links
Date: Mon, 07 Dec 2020 15:57:16 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> Maybe:
>
> cd /tmp
> mkdir git
> cd git
> touch 1
> git init
> git add .
> git commit -m "c1"
> cd /tmp
> ln -s git/1
> ln -s git git2

Thanks!

> emacs -Q /tmp/1
>  -> "Symbolic link to Git-controlled source file; follow link?"
>
> emacs -Q /tmp/git2/1
>  -> no prompt
>
> I don't think I see why that matters though, so maybe not the right example.

I think that's the correct recipe for the issue described.

And it does seem rather odd, doesn't it?  In both cases, we're following
a symlink, but we only get the warning in the first case?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Removed tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 07 Dec 2020 14:58:02 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.