@@ -111,7 +111,7 @@ __git_ps1_show_upstream ()
111
111
112
112
# get some config options from git-config
113
113
local output=" $( git config -z --get-regexp ' ^(svn-remote\..*\.url|bash\.showupstream)$' 2> /dev/null | tr ' \0\n' ' \n ' ) "
114
- while read key value; do
114
+ while read -r key value; do
115
115
case " $key " in
116
116
bash.showupstream)
117
117
GIT_PS1_SHOWUPSTREAM=" $value "
@@ -589,7 +589,7 @@ __git_refs ()
589
589
local ref entry
590
590
git --git-dir=" $dir " for-each-ref --shell --format=" ref=%(refname:short)" \
591
591
" refs/remotes/" | \
592
- while read entry; do
592
+ while read -r entry; do
593
593
eval " $entry "
594
594
ref=" ${ref#*/ } "
595
595
if [[ " $ref " == " $cur " * ]]; then
@@ -602,7 +602,7 @@ __git_refs ()
602
602
case " $cur " in
603
603
refs|refs/* )
604
604
git ls-remote " $dir " " $cur *" 2> /dev/null | \
605
- while read hash i; do
605
+ while read -r hash i; do
606
606
case " $i " in
607
607
* ^{}) ;;
608
608
* ) echo " $i " ;;
@@ -611,7 +611,7 @@ __git_refs ()
611
611
;;
612
612
* )
613
613
git ls-remote " $dir " HEAD ORIG_HEAD ' refs/tags/*' ' refs/heads/*' ' refs/remotes/*' 2> /dev/null | \
614
- while read hash i; do
614
+ while read -r hash i; do
615
615
case " $i " in
616
616
* ^{}) ;;
617
617
refs/* ) echo " ${i# refs/*/ } " ;;
@@ -636,7 +636,7 @@ __git_refs_remotes ()
636
636
{
637
637
local i hash
638
638
git ls-remote " $1 " ' refs/heads/*' 2> /dev/null | \
639
- while read hash i; do
639
+ while read -r hash i; do
640
640
echo " $i :refs/remotes/$1 /${i# refs/ heads/ } "
641
641
done
642
642
}
@@ -1863,7 +1863,7 @@ __git_config_get_set_variables ()
1863
1863
done
1864
1864
1865
1865
git --git-dir=" $( __gitdir) " config $config_file --list 2> /dev/null |
1866
- while read line
1866
+ while read -r line
1867
1867
do
1868
1868
case " $line " in
1869
1869
* .* =* )
0 commit comments