Skip to content

Commit

Permalink
Merge branch 'tr/maint-1.6.5-bash-prompt-show-submodule-changes'
Browse files Browse the repository at this point in the history
* tr/maint-1.6.5-bash-prompt-show-submodule-changes:
  bash completion: factor submodules into dirty state
  • Loading branch information
Junio C Hamano committed Jan 10, 2010
2 parents 7f695d2 + cf6e7ba commit 0196f4b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contrib/completion/git-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,9 @@ __git_ps1 ()
elif [ "true" = "$(git rev-parse --is-inside-work-tree 2>/dev/null)" ]; then
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ]; then
if [ "$(git config --bool bash.showDirtyState)" != "false" ]; then
git diff --no-ext-diff --ignore-submodules \
--quiet --exit-code || w="*"
git diff --no-ext-diff --quiet --exit-code || w="*"
if git rev-parse --quiet --verify HEAD >/dev/null; then
git diff-index --cached --quiet \
--ignore-submodules HEAD -- || i="+"
git diff-index --cached --quiet HEAD -- || i="+"
else
i="#"
fi
Expand Down

0 comments on commit 0196f4b

Please sign in to comment.