Skip to content

Commit

Permalink
git-prompt.sh: make $f local to __git_eread()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Justin Guenther authored and Junio C Hamano committed Dec 12, 2014
1 parent 59d3924 commit 9dd70e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/completion/git-prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring ()

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

0 comments on commit 9dd70e0

Please sign in to comment.