8000 [#1148] Don't show deleted files in listing by raxod502 · Pull Request #1825 · bbatsov/projectile · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
bbatsov merged 6 commits intobbatsov:masterfrom
raxod502:rr-fd-for-git
Mar 12, 2023
Merged

[#1148] Don't show deleted files in listing#1825
bbatsov merged 6 commits intobbatsov:masterfrom
raxod502:rr-fd-for-git

Conversation

@raxod502
Copy link
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 #1148
@raxod502
Copy link
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.


### 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
Contributor Author

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

"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
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
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
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

0