Re: [PATCH 1/2] Add a new option 'core.askpass'.
From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:24
Knut Franke wrote:
On Friday 27 August 2010 19:28:38 Junio C Hamano wrote:
quoted
Also this does not feel like a "core." thing, but it may be just me.Where else could it go? It's not entirely http specific: $ grep git_getpass *.c connect.c:char *git_getpass(const char *prompt) http.c: user_pass = xstrdup(git_getpass("Password: ")); http.c: ssl_cert_password = git_getpass("Certificate Password: "); http.c: * git_getpass is needed here because its very likely stdin/stdout are http.c: * but that is non-portable. Using git_getpass() can at least be stubbed http.c: user_name = xstrdup(git_getpass("Username: ")); imap-send.c: arg = git_getpass(prompt); Nor does it relate to a single command.
Perhaps "push.askpass" and "imap.askpass", maybe with the latter defaulting to the former or something? This would help preserve the illusion that the git commands are sort of independent tools. Haven't thought deeply about it at all, though.