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

Gstatus very slow with many untracked files #726

Closed
ghost opened this issue Nov 29, 2015 · 7 comments
Closed

Gstatus very slow with many untracked files #726

ghost opened this issue Nov 29, 2015 · 7 comments

Comments

@ghost
Copy link

ghost commented Nov 29, 2015

21b6dd7 made Gstatus display all the untracked files (with a recent git). The issue is that is that with many untracked files, this makes Gstatus extremely slow to update. Would it be possible to add an option to revert to the original behaviour (don't pass -u to git status), or even better choose which option is passed to -u (no/normal/all)?

@tpope
Copy link
Owner

tpope commented Dec 1, 2015

I think I'll just revert it (sorry @elyscape) as it never really sat right with me. My inclination is to suggest setting showUntrackedFiles directly if you really care about it.

@tpope tpope closed this as completed in 23faead Dec 1, 2015
@tpope
Copy link
Owner

tpope commented Dec 1, 2015

Though I would also like to go on the record and say that this is what .gitignore and .git/info/exclude are for. So there's your config option, should some variant of this behavior ever make it back.

@elyscape
Copy link
Contributor

elyscape commented Dec 1, 2015

Oh well! Thanks for tagging me.

Would it be possible to add a setting to pass arbitrary flags to git on certain or all commands? I prefer not having status.showUntrackedFiles set to all in my .gitconfig but I also want to have that functionality in fugitive, if that's possible. If you'd be okay with that enhancement, I can whip up a pull request.

@tpope
Copy link
Owner

tpope commented Dec 1, 2015

Now that I think about it you could probably just tack those onto g:fugitive_git_executable.

What's the priority for -c arguments? I am wondering if we bring it back, can @Corax26 (or myself) do the opposite and override the value given in the plugin (which comes later on the command line).

@elyscape
Copy link
Contributor

elyscape commented Dec 1, 2015

On git 2.6.3 (and likely everything since 1.8), priority for -c arguments is that, if you have multiple for the same setting, the last one takes precedence. The -u argument overrides any setting you might provide for status.showUntrackedFiles, but that was only being applied for git 1.4-1.7 anyway.

@tpope
Copy link
Owner

tpope commented Dec 1, 2015

Yeah that's no good for my idea, since g:fugitive_git_executable arguments would always precede the :Gstatus ones. Will think on it.

@ghost
Copy link
Author

ghost commented Dec 2, 2015

@tpope I agree that .gitignore mostly solves the issue, still I think in most cases the default behaviour is preferable. Thanks for reverting to the default option.

As to make it configurable, since git status is explicitly passed the -u option it will indeed override anything else, so I think the only solution would be to add an additional fugitive config variable.

wadkar pushed a commit to wadkar/vim-fugitive that referenced this issue Dec 16, 2015
brendeschuijmert pushed a commit to brendeschuijmert/vim-fugitive that referenced this issue Aug 6, 2019
This reverts commit 21b6dd7aeec3e4bc96d7b32cd594b7818c0c4082.

Closes tpope/vim-fugitive#726
brendeschuijmert added a commit to brendeschuijmert/vim-fugitive that referenced this issue Apr 13, 2020
This reverts commit 21b6dd7aeec3e4bc96d7b32cd594b7818c0c4082.

Closes tpope/vim-fugitive#726
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

No branches or pull requests

2 participants