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

lazygit deletes/operates the wrong file #3960

Open
m-fonseca opened this issue Oct 3, 2024 · 0 comments
Open

lazygit deletes/operates the wrong file #3960

m-fonseca opened this issue Oct 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@m-fonseca
Copy link

Describe the bug
When you create a directory and file inside that directory over a deleted symlink you get into a situation where the selected file on the GUI is not the file that is being operated on. This can unfortunately lead you to delete (in my case) files you weren't expecting too 😢 .

To Reproduce

The following commands will quickly reproduce this:

mkdir testrepo
cd testrepo
touch a
mkdir testdir
touch testdir/b
ln -s testdir test_symlink
git init .
git add .
git commit -m "test_commit"
rm test_symlink
mkdir test_symlink
touch test_symlink/c
touch z
lazygit

Expected behavior
For the selected file to match the file thats being operated on.

Screenshots
lg

Notice the file that's selected is not the file that's being operated on in the unstaged changes window.

Version info:

➜ go install github.com/jesseduffield/[email protected]
➜ lazygit -v
commit=, build date=, build source=unknown, version=unversioned, os=linux, arch=amd64, git version=2.41.0
@m-fonseca m-fonseca added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant