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 <lznuaa@xxxxxxxxx> wrote:
> git-svn reads passwords from an interactive terminal.
> This behavior cause GUIs to hang waiting for git-svn to
> complete
> 
> Fix this problem by allowing a password-retrieving command
> to be specified in GIT_ASKPASS. SSH_ASKPASS is supported
> as a fallback when GIT_ASKPASS is not provided.
> 
> Signed-off-by: Frank Li <lznuaa@xxxxxxxxx>
> ---
>  git-svn.perl |   37 +++++++++++++++++++++++++++----------
>  1 files changed, 27 insertions(+), 10 deletions(-)
> 
> diff --git a/git-svn.perl b/git-svn.perl
> index 265852f..cd39792 100755
> --- a/git-svn.perl
> +++ b/git-svn.perl
> @@ -31,6 +31,16 @@ if (! exists $ENV{SVN_SSH}) {
>  	}
>  }
>  
> +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"/;
> +                }
> +	}
> +}
> +

Hi Frank,

Since this logic isn't SVN-specific, can we get this in Git.pm
and/or git-var so other tools can use it?

Thanks

-- 
Eric Wong
--
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]