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

Re: [PATCH v2 1/3] git-svn: Support retrieving passwords with GIT_ASKPASS

From
Johannes Sixt <j6t@kdbg.org>
Date
Feb 26, 2010, 17:41 UTC
Message-ID
<4B8807AE.2090502@kdbg.org>
In-Reply-To
<1267142845-3040-1-git-send-email-lznuaa@gmail.com>
Frank Li schrieb:
Show 6 quoted lines
> +if (! exists $ENV{GIT_ASKPASS}) {
> +	if (exists $ENV{SSH_ASKPASS}) {
> +		$ENV{GIT_ASKPASS} = $ENV{SSH_ASKPASS};
> +		if ($^O eq 'msys') {
> +                        $ENV{GIT_ASKPASS} =~ s/\\/\\\\/g;
> +                        $ENV{GIT_ASKPASS} =~ s/(.*)/"$1"/;
Don't quote GIT_ASKPASS here.
> +	if (exists $ENV{GIT_ASKPASS}) {
> +		open(PH, "$ENV{GIT_ASKPASS} \"$prompt\" |");
		open(PH, "-|", $ENV{GIT_ASKPASS}, $prompt);
and you don't have to do any quoting at all, no?
-- Hannes
Previous: Eric Wong
Message 5 of 5 in “git-svn: Support retrieving passwords with GIT_ASKPASS”
  1. 1/3 git-svn: Support retrieving passwords with GIT_ASKPASSFrank Li, Feb 26, 2010
  2. Junio C HamanoFeb 26, 2010
  3. Frank LiFeb 26, 2010
  4. Eric WongFeb 26, 2010
  5. Johannes SixtFeb 26, 2010

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.