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

way to ignore certain git directories #70

Open
cagney opened this issue Oct 31, 2023 · 1 comment
Open

way to ignore certain git directories #70

cagney opened this issue Oct 31, 2023 · 1 comment

Comments

@cagney
Copy link

cagney commented Oct 31, 2023

Is there a way to flag that certain very large git repositories should be ignored by pretty-git-prompt?
For instance, step into the linux sources and there's a 1s pause; step into BSD source and:

[netbsd-10]$ date
Tue 31 Oct 2023 02:56:34 PM EDT
date
[netbsd-10]$ date
Tue 31 Oct 2023 02:57:02 PM EDT

the initial pause is about 30 seconds; refreshing the index gets the time down to a few seconds though.

@TomasTomecek
Copy link
Owner

Hi, this is a great suggestion! I also struggled with it while working with sources such as linux kernel, kubernetes or systemd.

You can solve this on a shell level. I use zsh and this is how I invoke pretty-git-prompt:

local show_git_stats='$(pretty-git-prompt)'

RPROMPT="${jobs_d} ${return_code} ${show_git_stats}"

show_git_stats could be a shell function that prints nothing for those ignored paths, otherwise it invokes the tool

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants