Skip to content

Commit c2a454d

Browse files
author
Martin Gondermann
committed
Revert "removed unneeded calls to git_prompt_config"
This reverts commit 4cbef92.
1 parent 5be51b8 commit c2a454d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

gitprompt.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ function git_prompt_config()
107107
GIT_PROMPT_FETCH_TIMEOUT=${1-5}
108108
if [ "x$__GIT_STATUS_CMD" == "x" ]
109109
then
110+
git_prompt_dir
110111
local sfx file
111112
# look first for a '.sh' version, then use the python version
112113
for sfx in sh py ; do
@@ -124,6 +125,8 @@ function setGitPrompt() {
124125
local EMPTY_PROMPT
125126
local __GIT_STATUS_CMD
126127

128+
git_prompt_config
129+
127130
local repo=`git rev-parse --show-toplevel 2> /dev/null`
128131
if [[ ! -e "${repo}" ]]; then
129132
PS1="${EMPTY_PROMPT}"
@@ -135,6 +138,9 @@ function setGitPrompt() {
135138
}
136139

137140
function checkUpstream() {
141+
local GIT_PROMPT_FETCH_TIMEOUT
142+
git_prompt_config
143+
138144
local FETCH_HEAD="${repo}/.git/FETCH_HEAD"
139145
# Fech repo if local is stale for more than $GIT_FETCH_TIMEOUT minutes
140146
if [[ ! -e "${FETCH_HEAD}" || -e `find "${FETCH_HEAD}" -mmin +${GIT_PROMPT_FETCH_TIMEOUT}` ]]
@@ -253,5 +259,4 @@ else
253259
fi
254260

255261
git_prompt_dir
256-
git_prompt_config
257262
source $__GIT_PROMPT_DIR/git-prompt-help.sh

0 commit comments

Comments
 (0)