You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use one of the predefined prompts showing git info, like "Informative Vcs" or "Terlar".
git clone https://git.freebsd.org/ports.git
Change directory and give me access to my shell back, fast.
Shell session blocked for ~15s.
Have __terlar_git_prompt and fish_git_prompt pass -uno to git status,
which makes it ignore untracked files. This speeds up the prompt generation
by a factor of something like 30-100, even when no untracked files are around.
fish_git_prompt has some settings that would make this invalid behavior
(show_informative_status, showuntrackedfiles), but -uno should at least
be the default because it makes the prompt on big repos so much faster.
I would also argue that a timeout like proposed by @cg505 and @krobelus
in #6764 should be wrapped around calls to prompt functions.
The text was updated successfully, but these errors were encountered:
Not that this solves the problem, since the default prompts should still be responsive, but you might want to check out https://github.com/IlanCosman/tide, which has an async git prompt. 0 delay ever, always have access to your shell. Sorry for the plug, just want to make sure you have a good fish experience 😅
If -uno helps, your problem isn't lots of commits - it's lots of files.
And the normal fish_git_prompt already doesn't care about untracked files, it requires you to specifically set $__fish_git_prompt_showuntrackedfiles (and to not have git's bash.showuntrackedfiles option set to false on that repo).
What you're using however is the informative mode (which the informative sample prompt turns on). In this mode it's meant to count all the files. We pass "-unormal" (not "-uno") to not descend into untracked directories. If we passed -uno instead it wouldn't count untracked files at all, which doesn't seem right. (for historical reasons, the terlar prompt has its own git prompt implementation - I've been working on unifying the two)
So really, what we could do, other than 6764, is to remove the informative prompt so at least you'd have to enable informative mode yourself. (we should also either remove or unify the terlar prompt because it does unnecessary work)