@@ -19,42 +19,6 @@ if [ -z "${__GIT_PROMPT_DIR}" ]; then
19
19
__GIT_PROMPT_DIR=" $( cd -P " $( dirname " ${SOURCE} " ) " && pwd ) "
20
20
fi
21
21
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
-
58
22
gitsym=` git symbolic-ref HEAD`
59
23
60
24
# if "fatal: Not a git repo .., then exit
@@ -93,7 +57,7 @@ if [[ -z "$branch" ]]; then
93
57
if [[ -n " $tag " ]]; then
94
58
branch=" $tag "
95
59
else
96
- branch=" ${symbols_prehash} ` git rev-parse --short HEAD` "
60
+ branch=" _PREHASH_ ` git rev-parse --short HEAD` "
97
61
fi
98
62
else
99
63
remote_name=` git config branch.${branch} .remote`
@@ -126,10 +90,10 @@ else
126
90
num_ahead=` count_lines " $revgit " " ^>" `
127
91
num_behind=$(( num_revs - num_ahead ))
128
92
if (( num_behind > 0 )) ; then
129
- remote=" ${remote}${symbols_behind} ${num_behind} "
93
+ remote=" ${remote} _BEHIND_ ${num_behind} "
130
94
fi
131
95
if (( num_ahead > 0 )) ; then
132
- remote=" ${remote}${symbols_ahead} ${num_ahead} "
96
+ remote=" ${remote} _AHEAD_ ${num_ahead} "
133
97
fi
134
98
fi
135
99
0 commit comments