File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ __git_ps1_show_upstream ()
124
124
fi
125
125
;;
126
126
svn-remote.* .url)
127
- svn_remote[ $(( ${# svn_remote[@]} + 1 )) ]=" $value "
127
+ svn_remote[$(( ${# svn_remote[@]} + 1 )) ]=" $value "
128
128
svn_url_pattern+=" \\ |$value "
129
129
upstream=svn+git # default upstream is SVN if available, else git
130
130
;;
@@ -146,10 +146,11 @@ __git_ps1_show_upstream ()
146
146
svn* )
147
147
# get the upstream from the "git-svn-id: ..." in a commit message
148
148
# (git-svn uses essentially the same procedure internally)
149
- local svn_upstream=($( git log --first-parent -1 \
149
+ local -a svn_upstream
150
+ svn_upstream=($( git log --first-parent -1 \
150
151
--grep=" ^git-svn-id: \(${svn_url_pattern# ??} \)" 2> /dev/null) )
151
152
if [[ 0 -ne ${# svn_upstream[@]} ]]; then
152
- svn_upstream=${svn_upstream[ ${#svn_upstream[@]} - 2 ]}
153
+ svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
153
154
svn_upstream=${svn_upstream%@* }
154
155
local n_stop=" ${# svn_remote[@]} "
155
156
for (( n= 1 ; n <= n_stop; n++ )) ; do
You can’t perform that action at this time.
0 commit comments