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

Smarter detection of git trees in file picker #983

Closed
wezm opened this issue Nov 4, 2021 · 1 comment
Closed

Smarter detection of git trees in file picker #983

wezm opened this issue Nov 4, 2021 · 1 comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@wezm
Copy link

wezm commented Nov 4, 2021

Related: to:

A real world scenario for your consideration: the repository that I work on in my job contains 36,504 files tracked by git (git ls-files|wc -l), 564,380 files total (including build artefacts etc., find . -type f | wc -l). Because it's so large I use git worktrees to have multiple worktrees but only one copy of the 3.8Gb git repo. The naïve check for .git done here:

let mut files: Vec<_> = if root.join(".git").is_dir() {
files.collect()
} else {
const MAX: usize = 8192;
files.take(MAX).collect()
};

does not handle this case as the work trees do not have a .git directory, which results in the file list being capped at 8k files. There's also the issue raised on #187 that the check does not work when you are not in the top level of the project.

In my vim config I use https://github.com/lotabout/skim.vim this readily handles extremely large file tree (such as accidentally running it in my home directory) and since the UI is responsive while results are streaming it it's easy to hit Esc and cancel it if this was a mistake.

I guess my point to all of this is in an ideal scenario the file limit would be removed (thus removing the need for the .git check) and the UI would support cancellation of loading large trees.

@wezm wezm added the C-enhancement Category: Improvements label Nov 4, 2021
@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 5, 2021
@kirawi kirawi added the E-good-first-issue Call for participation: Issues suitable for new contributors label Nov 11, 2021
@pickfire pickfire added the E-medium Call for participation: Experience needed to fix: Medium / intermediate label Nov 16, 2021
@kirawi kirawi removed the E-good-first-issue Call for participation: Issues suitable for new contributors label Dec 8, 2021
@archseer
Copy link
Member

Should be fixed by #5097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

4 participants