From: Justin Guenther Date: Fri, 12 Dec 2014 21:59:56 +0000 (-0600) Subject: git-prompt.sh: make $f local to __git_eread() X-Git-Tag: v2.3.0-rc0~38^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9dd70e0a0d17aa66c2d95a05952dec05db156fe3;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index 54489080f8..dba928ed00 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring () eread () { - f="$1" + local f="$1" shift test -r "$f" && read "$@" <"$f" }