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

[#1148] Don't show deleted files in listing #1825

Merged
merged 6 commits into from Mar 12, 2023

Conversation

raxod502
Copy link
Sponsor Contributor

@raxod502 raxod502 commented Feb 28, 2023

When fd is installed, use it with appropriate options instead of git ls-files in order to fix #1148.


Before submitting a PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

Thanks!

When fd is installed, use it with appropriate options instead of git
ls-files in order to fix bbatsov#1148
@raxod502
Copy link
Sponsor Contributor Author

No test or README updates made because this type of functionality was not previously present in test framework or README. However, if it would help out the project, I don't mind making updates for one or both to start them off.

projectile.el Outdated Show resolved Hide resolved
@@ -7,6 +7,10 @@
* Add elm project type.
* [#1821](https://github.com/bbatsov/projectile/pull/1821): Add `pyproject.toml` discovery for python projects.

### Changes

* [#1285](https://github.com/bbatsov/projectile/pull/1825): By default, use [fd](https://github.com/sharkdp/fd) in Git repositories instead of `git ls-files` when it is installed, in order to solve the problem where deleted files were still shown in `projectile-find-file` until their deletions were staged. The user-facing behavior should be the same, although potentially with different performance characteristics in large Git repositories. The old behavior can be reclaimed by setting `projectile-git-use-fd` to nil.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd also make a note of this in the docs (probably somewhere in usage and in the FAQ).

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized there is a separate usage page apart from the readme. It already says fd is used when possible and installed, shall I add more detail about how Projectile determines which tool to use?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess that'd be a nice addition to the docs.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

projectile.el Show resolved Hide resolved
"Arguments to fd used to re-implement `git ls-files'.
This is used with `projectile-fd-executable' when `projectile-git-use-fd'
is non-nil."
:group 'projectile
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should have a :package-version as well.

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, b68f7ef

@raxod502
Copy link
Sponsor Contributor Author

Looks like CI is failing with:

/home/runner/work/_actions/purcell/setup-emacs/master/dist/install-nix.sh: line 63: cachix: command not found

at e.g. https://github.com/bbatsov/projectile/actions/runs/4299885959/jobs/7495540856

I don't think that's related to this change. I'm happy to help troubleshoot that if it would be helpful.

@raxod502
Copy link
Sponsor Contributor Author

raxod502 commented Mar 12, 2023

Looks like the above error was resolved, however snapshot build is failing with:

             projectile.el:6134:19: Error: reference to free variable ‘savehist-additional-variables’
[00:00.346]  projectile.el:6134:19: Error: assignment to free variable ‘savehist-additional-variables’

at e.g. https://github.com/bbatsov/projectile/actions/runs/4394757932/jobs/7695987087

Again I don't think it's related to this change, but happy to help troubleshoot.

@bbatsov bbatsov merged commit 6dc5883 into bbatsov:master Mar 12, 2023
@bbatsov
Copy link
Owner

bbatsov commented Mar 12, 2023

Thanks for working on this. I'll check the CI problem myself at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleted files are still shown in projectile-find-file
2 participants