Logo

HPC @ Uni.lu

High Performance Computing in Luxembourg

FAQ: Slow Prompt When Entering a Huge Git Repository

The default prompt proposed on the ULHPC clusters feature a __git_ps1 call which mentioned in your prompt line the current branch.

Moreover, by default, dirty states are reported via a set of GIT_PS1_* variables:

1
2
3
4
5
$> sift GIT_PS1 ~/.bashrc| grep -v \#
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_DESCRIBE_STYLE='branch'

This comes at a non negligible cost which might be prohibitive when navigating within big git repositories.

To disable it:

1
2
3
4
5
# Local disabling (current repository)
git config bash.showDirtyState false

# Globally disable it
 git config --global bash.showDirtyState false

Check this issue on our tracker for any other questions