git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: don't leak variable from the prompt into environment

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 9, 2011, 13:11 UTC
Message-ID
<7vd3d1widd.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1320832970-26239-1-git-send-email-szeder@ira.uka.de>
SZEDER Gábor <szeder@ira.uka.de> writes:
Show 5 quoted lines
> 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.
> ---
Thanks; I'd consider this signed-off?
Show 16 quoted lines
>  contrib/completion/git-completion.bash |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index b3571ab4..d18895b1 100755
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -110,7 +110,7 @@ __git_ps1_show_upstream ()
>  	local upstream=git legacy="" verbose=""
>  
>  	# get some config options from git-config
> -	output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
> +	local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
>  	while read key value; do
>  		case "$key" in
>  		bash.showupstream)
Previous: SZEDER GáborNext: SZEDER Gábor
Message 2 of 3 in “completion: don't leak variable from the prompt into environment”
  1. completion: don't leak variable from the prompt into environmentSZEDER Gábor, Nov 9, 2011
  2. Junio C HamanoNov 9, 2011
  3. SZEDER GáborNov 9, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.