Merge branch 'master' into themes

* master:
  Added possibility to ignore a repository completely by adding "GIT_PROMPT_IGNORE=1" to .bash-git-rc Fixes #80
master
Martin Gondermann 11 years ago
commit b899f2a63f
  1. 3
      README.md
  2. 9
      gitprompt.sh

@ -166,6 +166,9 @@ GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_ " # displays as ✘-1 fo
on a per repository basis by creating a file named ``.bash-git-rc`` with the on a per repository basis by creating a file named ``.bash-git-rc`` with the
content ``FETCH_REMOTE_STATUS=0`` in the root of your git repository. content ``FETCH_REMOTE_STATUS=0`` in the root of your git repository.
- You can also ignore a repository completely by creating a file named ``.bash-git-rc`` with the
content ``GIT_PROMPT_IGNORE=1`` in the root of your git repository.
- You can get help on the git prompt with the function ``git_prompt_help``. - You can get help on the git prompt with the function ``git_prompt_help``.
Examples are available with ``git_prompt_examples``. Examples are available with ``git_prompt_examples``.
A list of all available named colors is available with `git_prompt_color_samples` A list of all available named colors is available with `git_prompt_color_samples`

@ -283,11 +283,18 @@ function setGitPrompt() {
FETCH_REMOTE_STATUS=0 FETCH_REMOTE_STATUS=0
fi fi
unset GIT_PROMPT_IGNORE
if [[ -e "$repo/.bash-git-rc" ]]; then if [[ -e "$repo/.bash-git-rc" ]]; then
source "$repo/.bash-git-rc" source "$repo/.bash-git-rc"
fi fi
if [ "$FETCH_REMOTE_STATUS" = 1 ]; then if [[ "$GIT_PROMPT_IGNORE" = 1 ]]; then
PS1="$EMPTY_PROMPT"
return
fi
if [[ "$FETCH_REMOTE_STATUS" = 1 ]]; then
checkUpstream checkUpstream
fi fi

Loading…
Cancel
Save