bash: offer to show (un)staged changes
commit738a94a9f645a5f63fbccaab76d5e43a97e53d78
authorThomas Rast <trast@student.ethz.ch>
Tue, 3 Feb 2009 09:20:54 +0000 (3 10:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 4 Feb 2009 06:07:51 +0000 (3 22:07 -0800)
treea52befa2e211101cc13d2f4803e6f47fbff36b5d
parente656fc97a2be4586bfef25714d588f002d2605a2
bash: offer to show (un)staged changes

Add a bit of code to __git_ps1 that lets it append '*' to the branch
name if there are any unstaged changes, and '+' if there are any
staged changes.

Since this is a rather expensive operation and will force a lot of
data into the cache whenever you first enter a repository, you have to
enable it manually by setting GIT_PS1_SHOWDIRTYSTATE to a nonempty
value.  The configuration variable bash.showDirtyState can then be
used to disable it again for some repositories.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash