From 4cbef92cf5b23905f0cea131475a244d0e7d4202 Mon Sep 17 00:00:00 2001 From: Martin Gondermann Date: Wed, 29 Jan 2014 11:08:29 +0100 Subject: [PATCH] removed unneeded calls to git_prompt_config --- gitprompt.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gitprompt.sh b/gitprompt.sh index ead38f4..78f58cb 100755 --- a/gitprompt.sh +++ b/gitprompt.sh @@ -107,7 +107,6 @@ function git_prompt_config() GIT_PROMPT_FETCH_TIMEOUT=${1-5} if [ "x$__GIT_STATUS_CMD" == "x" ] then - git_prompt_dir local sfx file # look first for a '.sh' version, then use the python version for sfx in sh py ; do @@ -125,8 +124,6 @@ function setGitPrompt() { local EMPTY_PROMPT local __GIT_STATUS_CMD - git_prompt_config - local repo=`git rev-parse --show-toplevel 2> /dev/null` if [[ ! -e "${repo}" ]]; then PS1="${EMPTY_PROMPT}" @@ -138,9 +135,6 @@ function setGitPrompt() { } function checkUpstream() { - local GIT_PROMPT_FETCH_TIMEOUT - git_prompt_config - local FETCH_HEAD="${repo}/.git/FETCH_HEAD" # Fech repo if local is stale for more than $GIT_FETCH_TIMEOUT minutes if [[ ! -e "${FETCH_HEAD}" || -e `find "${FETCH_HEAD}" -mmin +${GIT_PROMPT_FETCH_TIMEOUT}` ]] @@ -259,4 +253,5 @@ else fi git_prompt_dir +git_prompt_config source $__GIT_PROMPT_DIR/git-prompt-help.sh