Skip to content

Commit d48d298

Browse files
committed
simplify git completion while loop to prevent git PS1 from breaking in msys environment
1 parent a03ceba commit d48d298

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/completion/git-completion.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ __git_ps1_show_upstream ()
110110
local upstream=git legacy="" verbose=""
111111

112112
# get some config options from git-config
113+
(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ') |\
113114
while read key value; do
114115
case "$key" in
115116
bash.showupstream)
@@ -125,8 +126,7 @@ __git_ps1_show_upstream ()
125126
upstream=svn+git # default upstream is SVN if available, else git
126127
;;
127128
esac
128-
done < <(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')
129-
129+
done
130130
# parse configuration values
131131
for option in ${GIT_PS1_SHOWUPSTREAM}; do
132132
case "$option" in
@@ -2058,7 +2058,7 @@ _git_config ()
20582058
color.ui
20592059
commit.status
20602060
commit.template
2061-
core.abbrevguard
2061+
core.abbrev
20622062
core.askpass
20632063
core.attributesfile
20642064
core.autocrlf

0 commit comments

Comments
 (0)