Browse Source

git-prompt.sh: make $f local to __git_eread()

This function uses (non-local) $f to store the value of its first parameter.
This can interfere with the user's environment.

Signed-off-by: Justin Guenther <jguenther@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Justin Guenther 10 years ago committed by Junio C Hamano
parent
commit
9dd70e0a0d
  1. 2
      contrib/completion/git-prompt.sh

2
contrib/completion/git-prompt.sh

@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring () @@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring ()

eread ()
{
f="$1"
local f="$1"
shift
test -r "$f" && read "$@" <"$f"
}

Loading…
Cancel
Save