mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
PR Description Problem The Git prompt in Oh My Zsh is extremely slow (2–5 seconds) in large repositories, especially on machines with file/network auditing (like office Macs). The slowdown is caused by: git status --porcelain -b scanning untracked files Repeated git rev-list and show-ref calls Solution Introduced a lightweight fix using the existing DISABLE_UNTRACKED_FILES_DIRTY environment variable. When set to true, the prompt skips scanning untracked files: DISABLE_UNTRACKED_FILES_DIRTY=true Updated _omz_git_prompt_status to respect this variable. All other prompt behavior remains unchanged. How to Use Add to your .zshrc before sourcing Oh My Zsh: export DISABLE_UNTRACKED_FILES_DIRTY=true Reload the shell: exec zsh Before vs After Action Before After Enter large Git repo ~2–5s delay <0.5s Tab completion for branches 4–5s delay <0.2s Prompt shows branch Yes Yes Additional Notes Optional: users can still disable the status portion entirely with: export DISABLE_GIT_PROMPT_STATUS=true Fully backward compatible. Related Issue Fixes #13082 |
||
|---|---|---|
| .. | ||
| tests | ||
| async_prompt.zsh | ||
| bzr.zsh | ||
| cli.zsh | ||
| clipboard.zsh | ||
| compfix.zsh | ||
| completion.zsh | ||
| correction.zsh | ||
| diagnostics.zsh | ||
| directories.zsh | ||
| functions.zsh | ||
| git.zsh | ||
| grep.zsh | ||
| history.zsh | ||
| key-bindings.zsh | ||
| misc.zsh | ||
| nvm.zsh | ||
| prompt_info_functions.zsh | ||
| spectrum.zsh | ||
| termsupport.zsh | ||
| theme-and-appearance.zsh | ||
| vcs_info.zsh | ||