-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
Deleted files are still shown in projectile-find-file #1148
Comments
Try |
@lfender6445 This makes no difference. |
Same problem, |
you have to do both, i.e. stage deletion with git along with cache invalidation afterwards |
This is not true, as far as I can tell from the tests I just did. If you haven't staged the deletion, then invalidating the cache does nothing—the file will be shown regardless. If you have staged the deletion, then invalidating the cache also does nothing—the file will not be shown regardless. |
commenting here just to keep track of it! |
@Andsbf There is a "subscribe to notifications" button that you can use to follow an issue without commenting. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
Just confirming that this issue is still reproducible with the current version of projectile. As I (like the original poster) find the current behavior confusing, I'm curious if anyone has found any workaround? |
This is still reproducible. I just found out about it using |
My workaround was to replace
Still have to find out how to deal with the files forcefully checked-in into Git despite being ignored by |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
To my knowledge this is still a bug. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
Unless I am mistaken, nothing has changed with regard to this bug. |
Yeah, that's true. Seems to me the simplest way to solve this would be to adjust the command in question, although I'm not sure what would be the optimal replacement. |
Relying on software such as |
Maybe that is a bit of track nowadays, but cleaning the tree by pushing the deleted files to git and then invalidating the cache solved the issue for me |
Correct, #1148 (comment) is still the best workaround. |
I found #1148 (comment) a suitable workaround for both Linux and macOS. |
When fd is installed, use it with appropriate options instead of git ls-files in order to fix bbatsov#1148
Filed #1825 to solve this issue, and implemented radian-software/radian@75e3434 to patch it in my Emacs configuration. |
Expected behavior
Suppose that I have a Git repository with some files committed to it. When I delete one of those files in my working directory, it should no longer show up in
projectile-find-file
.Actual behavior
All files in Git's index are shown in
projectile-find-file
. When I have renamed a file, this causes both the old path and the new path to show up inprojectile-find-file
. If the old path is listed earlier than the new path, this causes me to inadvertently re-create a file at the old path.Steps to reproduce the problem
Observe that both
existing-file
andnonexistent-file
are listed, whereas onlyexisting-file
should be listed.Observe that
nonexistent-file
is no longer listed if its deletion is added to the index.Cause
This is because Projectile uses
git ls-files
inprojectile-git-command
, andgit ls-files
shows files in the index, not files in the working directory.Environment & Version information
Projectile version information
Revision 56e262d, version 0.15.0snapshot.
Emacs version
GNU Emacs 25.2.1 from
brew cask install emacs
.Operating system
The text was updated successfully, but these errors were encountered: