completion: don't leak variable from the prompt into environment
Commit e5b8eebc (completion: fix issue with process substitution not working on Git for Windows, 2011-10-26) introduced a new variable in __git_ps1_show_upstream(), but didn't declare it as local to prevent it from leaking into the environment. We may want to rewrite it like the following, but that can wait until the next cycle. while read key value do ... done <<-EOF $(git config -z --get-regexp ...) EOF Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Nov 9, 2011 at 11:02 UTC
4804d437916d08068143dfc265cc7b5e2f4883e6
1 file changed
+1
-1
contrib/completion/git-completion.bash
+1
-1
@@ -110,7 +110,7 @@ __git_ps1_show_upstream ()
110
local upstream=git legacy="" verbose=""
111
112
# get some config options from git-config
113
- output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
113
+ local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
114
while read key value; do
115
case "$key" in
116
bash.showupstream)