Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes'

* tr/maint-1.6.5-bash-prompt-show-submodule-changes:
  bash completion: factor submodules into dirty state
This commit is contained in:
Junio C Hamano 2010-01-10 08:52:32 -08:00
commit 0196f4b5a3

View File

@ -142,11 +142,9 @@ __git_ps1 ()
elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then
if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then
git diff --no-ext-diff --ignore-submodules \ git diff --no-ext-diff --quiet --exit-code || w="*"
--quiet --exit-code || w="*"
if git rev-parse --quiet --verify HEAD >/dev/null; then if git rev-parse --quiet --verify HEAD >/dev/null; then
git diff-index --cached --quiet \ git diff-index --cached --quiet HEAD -- || i="+"
--ignore-submodules HEAD -- || i="+"
else else
i="#" i="#"
fi fi