git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Push from an SSH Terminal

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 4, 2012, 08:16 UTC
Message-ID
<7vhaz7hv3u.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120204080910.GA28317@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> On Fri, Feb 03, 2012 at 11:47:11PM -0800, Junio C Hamano wrote:
>
>> Jeff King <peff@peff.net> writes:
>>  ...
>> How well would it mesh with the goal of the ss/git-svn-prompt-sans-terminal
>> topic, which is now stalled [*1*]?  I do not mean this change and the other
>> topic textually conflict with each other---but the philosophies of this
>> topic and the other one seem to conflict.
>
> I don't see a conflict in the two series. That one seems to do two
> things for perl programs ...
That is the "[not] textually conflict" part of my message.
Show 5 quoted lines
> If you look into the original complaint mentioned in the commit
> messages, though, you will see that the some GUIs will appear to hang
> when the terminal is prompted (because the prompt is reading from some
> location invisible to the user). So in that sense, my patches could be a
> regression for those users, as outright failing is better for them.
Yes, that is what I meant by "philosophies conflict".
Show 8 quoted lines
> But I would argue that the bug is not prompting on the terminal, but
> rather that the terminal-prompting code does not recognize when there is
> no terminal connection to the user (and AFAICT, this is a Windows
> problem). Any solution that doesn't fix that is really just papering
> over the problem, and hurting people[1] on sane systems.
>
> So I'd rather see the version of getpass() in compat/mingw.c better
> learn to realize when we aren't actually connected to a console.
That is a sane diagnosis, I'd have to agree.
Thanks for a dose of sanity.
Show 16 quoted lines
> [1] The amount of hurt is relatively small, though. It only hurts people
>     who set GIT_ASKPASS but can't use it (e.g., you set it in your
>     .bashrc because you connect via "ssh -X", but this time you happen
>     to be ssh-ing from a Windows box). And you can generally fix that
>     outside of git (e.g., by checking $DISPLAY before setting the
>     variable).
>
>     So one one hand, I don't want to make a decision on behavior for
>     Unix users because we have to cater to Windows shortcomings. On the
>     other hand, while fixing the root problem is preferable, if
>     for whatever reason we can't reliably find out whether the user is
>     actually going to see and respond to the prompt on Windows, it may
>     be practical to just paper over the issue. On the gripping hand,
>     after the Sven's series, TortoiseGit users would see the hang
>     (instead of a failure) _only_ if their askpass command failed. Which
>     is also perhaps not that big a deal.
Wow, you do have many hands ;-).
Previous: Jeff KingNext: Jeff King
Message 11 of 12 in “Push from an SSH Terminal”
  1. Feanil PatelFeb 3, 2012
  2. Neal GroothuisFeb 3, 2012
  3. Feanil PatelFeb 3, 2012
  4. Neal GroothuisFeb 3, 2012
  5. Jeff KingFeb 3, 2012
  6. Jeff KingFeb 3, 2012
  7. 1/2 prompt: clean up strbuf usageJeff King, Feb 3, 2012
  8. 2/2 prompt: fall back to terminal if askpass failsJeff King, Feb 3, 2012
  9. Junio C HamanoFeb 4, 2012
  10. Jeff KingFeb 4, 2012
  11. Junio C HamanoFeb 4, 2012
  12. Jeff KingFeb 3, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.