Re: [PATCH 3/3] fallback SSH_ASKPASS when GIT_ASKPASS not set

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

 



Frank Li <lznuaa@xxxxxxxxx> writes:

> If GIT_ASKPASS is not set and SSH_ASKPASS set, GIT_ASKPASS will
> use SSH_ASKPASS. If GIT_ASKPASS set and SSH_ASKPASS is not set,
> SSH_ASKPASS will use GIT_ASKPASS.

If both are set and to different values, what should happen?

I think the basic idea is sound, but I am not sure if we should fallback
on both ways.  If both GIT_ASKPASS and SSH_ASKPASS are set, the user is
probably telling us to use GIT_ASKPASS when git does something, similar to
how GIT_EDITOR and EDITOR interacts.

So probably the patch to implement the fallback should be more like

	if (SSH_ASKPASS is set but not GIT_ASKPASS)
        	set GIT_ASKPASS from SSH_ASKPASS

and then the password prompter should use GIT_ASKPASS exclusively.

Of course, when we _do_ spawn ssh ourselves internally in connect.c, we
may have to export the value of GIT_ASKPASS as SSH_ASKPASS at the call
site to honor the user's request to use GIT_ASKPASS while in git (that is
part of "use GIT_ASKPASS exclusively").

But it feels wrong if we exported SSH_ASKPASS set from GIT_ASKPASS when
spawning processes in other codepaths, especially if SSH_ASKPASS is set
(or unset) differently from GIT_ASKPASS.

Shawn is CC'ed as git-gui currently honors only SSH_ASKPASS and this patch
changes the behaviour slightly.
--
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]