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>
This commit is contained in:
Justin Guenther 2014-12-12 15:59:56 -06:00 committed by Junio C Hamano
parent 59d3924fbb
commit 9dd70e0a0d

View File

@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring ()
eread ()
{
f="$1"
local f="$1"
shift
test -r "$f" && read "$@" <"$f"
}