Sven Strickroth <sven.strickroth@xxxxxxxxxxxxxxx> writes: > Am 04.01.2012 08:55 schrieb Sven Strickroth: >> The Git.pm part is easy, but I also tried to update prompt.c (untested). > > I said "easy" and then I mailed the wrong/outdated patch :( > I'm sorry for the noise. > > From: Sven Strickroth <email@xxxxxxxxxx> > Date: Wed, 4 Jan 2012 08:44:48 +0100 > Subject: [PATCH] Git.pm, prompt: try reading from interactive terminal > before using SSH_ASKPASS > > SVN tries to read reading from interactive terminal before using > SSH_ASKPASS helper. This change adjust git to behave the same way. It might be an accurate description of what Subversion does ("tries to" is the key phrase). I however do not know if it is equivalent to what your patch does. When GIT_ASKPASS is not set, the $prompt is given to the standard error stream unconditionally and then the "require Term::ReadKey" codepath is used. When the terminal is unavailable, you might get undef in $ret and be able to fall back on SSH_ASKPASS part, but you cannot take back the noise you have given to the standard error stream. Is there a way to ask Term::ReadKey (or possibly some other module) if we will be able to interact with the terminal _before_ we give that prompt? The simplest would be to do this, I would think, but I didn't test it. if (!defined $ret && -t) { print STDERR $prompt; if ($isPassword) { ... } if (!defined $ret) { $ret = _prompt($ENV{'SSH_ASKPASS'}, $prompt); } -- 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