summaryrefslogtreecommitdiff
path: root/contrib/completion/git-prompt.sh
diff options
context:
space:
mode:
authorJustin Guenther <jguenther@gmail.com>2014-12-12 21:59:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-12 23:13:37 (GMT)
commit9dd70e0a0d17aa66c2d95a05952dec05db156fe3 (patch)
tree979b352aceba19fe805b6375021fe278e4ae933f /contrib/completion/git-prompt.sh
parent59d3924fbb300ebfe05f9079bcfe29d0a3f30661 (diff)
downloadgit-9dd70e0a0d17aa66c2d95a05952dec05db156fe3.zip
git-9dd70e0a0d17aa66c2d95a05952dec05db156fe3.tar.gz
git-9dd70e0a0d17aa66c2d95a05952dec05db156fe3.tar.bz2
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>
Diffstat (limited to 'contrib/completion/git-prompt.sh')
-rw-r--r--contrib/completion/git-prompt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 5448908..dba928e 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"
}