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>

Justin Guenther committed Dec 12, 2014 at 15:59 UTC 9dd70e0a0d17aa66c2d95a05952dec05db156fe3
1 file changed +1 -1
contrib/completion/git-prompt.sh
+1 -1
@@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring ()
261
262 eread ()
263 {
264 - f="$1"
264 + local f="$1"
265 shift
266 test -r "$f" && read "$@" <"$f"
267 }