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

Trying to visit files in magit-diff-paths output leads to wrong path #5116

Open
gustav-b opened this issue Apr 1, 2024 · 0 comments
Open
Labels
bug minor A small thing is broken

Comments

@gustav-b
Copy link

gustav-b commented Apr 1, 2024

If I diff two files using the d p (magit-diff-paths) and then try to visit the files from the resulting diff buffer using RET (magit-diff-visit-file), this will fail because the attempted path is wrong.

Using Magit 20240320.2336 [>= 3.3.0.50-git], Transient 0.6.0, Git 2.44.0, Emacs 29.3, darwin

Steps to reproduce:

  1. In a repos /tmp/foo, magit-diff-paths the files a.txt and b.txt
  2. The resulting buffer will say Differences between /tmp/foo/a.txt and /tmp/foo/b.txt (correct)
  3. Now press RET in this buffer to visit b.txt
    Expected behavior: /tmp/foo/b.txt is opened.
    Actual behavior: Emacs tries to open /tmp/foo/tmp/foo/b.txt instead: process-file: Setting current directory: No such file or directory, /tmp/foo/tmp/foo/
magit-1 magit-2
@tarsius tarsius added the bug minor A small thing is broken label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug minor A small thing is broken
Development

No branches or pull requests

2 participants