Skip to content

Commit 9dd70e0

Browse files
jguenthergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 59d3924 commit 9dd70e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-prompt.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ __git_ps1_colorize_gitstring ()
261261

262262
eread ()
263263
{
264-
f="$1"
264+
local f="$1"
265265
shift
266266
test -r "$f" && read "$@" <"$f"
267267
}

0 commit comments

Comments
 (0)