Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated question about following links when opening status #2

Open
magthe opened this issue May 31, 2024 · 5 comments
Open

Repeated question about following links when opening status #2

magthe opened this issue May 31, 2024 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@magthe
Copy link

magthe commented May 31, 2024

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 😁

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 gekoke added the bug Something isn't working label May 31, 2024
@gekoke
Copy link
Owner

gekoke commented Jun 6, 2024

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
Copy link
Author

magthe commented Jun 7, 2024

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
Copy link

justinbarclay commented Jun 11, 2024

@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
Copy link
Author

magthe commented Jun 12, 2024

I'm using straight.

@gekoke gekoke added the help wanted Extra attention is needed label Sep 19, 2024
@jumper047
Copy link

jumper047 commented Oct 27, 2024

Also encountered this issue after moving to elpaca. This workaround works for me:

    (defun j47/execute-with-follow-symlinks (orig-fun &rest args)
      (let ((vc-follow-symlinks 't))
        (apply orig-fun args)))
    (advice-add 'el-patch-eval-template :around  #'j47/execute-with-follow-symlinks)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants