@@ -19,42 +19,6 @@ if [ -z "${__GIT_PROMPT_DIR}" ]; then
1919 __GIT_PROMPT_DIR=" $( cd -P " $( dirname " ${SOURCE} " ) " && pwd ) "
2020fi
2121
22- if [[ -z " $__GIT_PROMPT_COLORS_FILE " ]]; then
23- for dir in " $HOME " " $__GIT_PROMPT_DIR " ; do
24- for pfx in ' .' ' ' ; do
25- file=" $dir /${pfx} git-prompt-colors.sh"
26- if [[ -f " $file " ]]; then
27- __GIT_PROMPT_COLORS_FILE=" $file "
28- break 2
29- fi
30- done
31- done
32- fi
33-
34- # if the envar is defined, source the file for custom colors
35- if [[ -n " $__GIT_PROMPT_COLORS_FILE " && -f " $__GIT_PROMPT_COLORS_FILE " ]]; then
36- source " $__GIT_PROMPT_COLORS_FILE "
37- fi
38-
39- # change those symbols to whatever you prefer
40- if [[ -n " ${GIT_PROMPT_SYMBOLS_AHEAD} " ]]; then
41- symbols_ahead=" ${GIT_PROMPT_SYMBOLS_AHEAD} "
42- else
43- symbols_ahead=' ↑·'
44- fi
45-
46- if [[ -n " ${GIT_PROMPT_SYMBOLS_BEHIND} " ]]; then
47- symbols_behind=" ${GIT_PROMPT_SYMBOLS_BEHIND} "
48- else
49- symbols_behind=' ↓·'
50- fi
51-
52- if [[ -n " ${GIT_PROMPT_SYMBOLS_PREHASH} " ]]; then
53- symbols_prehash=' :'
54- else
55- symbols_prehash=" ${GIT_PROMPT_SYMBOLS_PREHASH} "
56- fi
57-
5822gitsym=` git symbolic-ref HEAD`
5923
6024# if "fatal: Not a git repo .., then exit
@@ -93,7 +57,7 @@ if [[ -z "$branch" ]]; then
9357 if [[ -n " $tag " ]]; then
9458 branch=" $tag "
9559 else
96- branch=" ${symbols_prehash} ` git rev-parse --short HEAD` "
60+ branch=" _PREHASH_ ` git rev-parse --short HEAD` "
9761 fi
9862else
9963 remote_name=` git config branch.${branch} .remote`
@@ -126,10 +90,10 @@ else
12690 num_ahead=` count_lines " $revgit " " ^>" `
12791 num_behind=$(( num_revs - num_ahead ))
12892 if (( num_behind > 0 )) ; then
129- remote=" ${remote}${symbols_behind} ${num_behind} "
93+ remote=" ${remote} _BEHIND_ ${num_behind} "
13094 fi
13195 if (( num_ahead > 0 )) ; then
132- remote=" ${remote}${symbols_ahead} ${num_ahead} "
96+ remote=" ${remote} _AHEAD_ ${num_ahead} "
13397 fi
13498fi
13599
0 commit comments