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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frank Li schrieb:
+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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]