gekoke / magit-file-icons

File icons for Magit
GNU General Public License v3.0
30 stars 6 forks source link

Repeated question about following links when opening status #2

Open magthe opened 2 months ago

magthe commented 2 months ago

Observed behaviour

When opening the magit status, magit-status, the first time in a workspace I get the question

Symbolic link to Git-controlled source file; follow link? (y or n)

I have to press y several times before I'm shown the magit status.

This happens for every repository I've tried so far, and it's repeated after restarting Emacs

Desired behaviour

Not having the question come up at all :grin:

My config

My setup of magit-file-icons looks like this

(use-package magit-file-icons
  :after magit
  :init (magit-file-icons-mode 1))
gekoke commented 1 month ago

Hi, thanks for you report.

I'm having trouble reproducing. Can you specify what files you have in these repositories, or does that seem to not play a role? Are there actually any tracked symlinks?

I'm assuming that this doesn't happen when magit-file-icons isn't installed? How about when the minor mode is disabled?

The function that gives you that prompt is vc-refresh-state. In Magit, it's only called in this line. Actually, that seems to be the only call to any function from the vc package.

magthe commented 1 month ago

I'm having trouble reproducing. Can you specify what files you have in these repositories, or does that seem to not play a role? Are there actually any tracked symlinks?

No, there are no tracked symlinks in the repositories where I see this behaviour.

I'm assuming that this doesn't happen when magit-file-icons isn't installed? How about when the minor mode is disabled?

Indeed, it does not happen when magit-file-icons isn't installed. If the minor mode is disabled I don't get the question, but as soon as I enable the mode the question pops up.

justinbarclay commented 1 month ago

@magthe Are you using Elpaca? Or maybe straight? I also ran into this issue, and I think it's a combination of Elpaca symlinking packages el-patch not playing nicely. Unfortunately, short of the author removing el-patch, I am not sure much can be done about that message because el-patch seems to have to open up the base file every time it is called.

magthe commented 1 month ago

I'm using straight.