{"thread":{"id":"32096","subject":"[PATCH 0/5] win32: support echo for terminal-prompt","startedAt":"2012-11-13T14:01:23Z","lastAt":"2012-11-13T14:04:13Z","messageCount":2,"participants":["Erik Faye-Lund"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"203077","messageId":"1352815288-3996-1-git-send-email-kusmabite@gmail.com","threadId":"32096","inReplyTo":null,"subject":"[PATCH 0/5] win32: support echo for terminal-prompt","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2012-11-13T14:01:23Z","receivedAt":"2012-11-13T14:01:23Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"We currently only support getpass, which does not echo at all, for\ngit_terminal_prompt on Windows. The Windows console is perfectly\ncapable of doing this, so let's make it so.\n\nThis implementation tries to reuse the /dev/tty-code as much as\npossible.\n\nThe big reason that this becomes a bit hairy is that Ctrl+C needs\nto be handled correctly, so we don't leak the console state to a\nnon-echoing setting when a user aborts.\n\nWindows makes this bit a little bit tricky, in that we need to\nimplement SIGINT for fgetc. However, I suspect that this is a good\nthing to do in the first place.\n\nAn earlier iteration was also breifly discussed here:\nhttp://mid.gmane.org/CABPQNSaUCEDU4+2N63n0k_XwSXOP_iFZG3GEYSPSBPcSVV8wRQ@mail.gmail.com\n\nThe series can also be found here, only with an extra patch that\nmakes the (interactive) testing a bit easier:\n\nhttps://github.com/kusma/git/tree/work/terminal-cleanup\n\nErik Faye-Lund (5):\n  mingw: make fgetc raise SIGINT if apropriate\n  compat/terminal: factor out echo-disabling\n  compat/terminal: separate input and output handles\n  mingw: reuse tty-version of git_terminal_prompt\n  mingw: get rid of getpass implementation\n\n compat/mingw.c    |  91 +++++++++++++++++++++++++++-----------\n compat/mingw.h    |   8 +++-\n compat/terminal.c | 129 ++++++++++++++++++++++++++++++++++++++++--------------\n 3 files changed, 169 insertions(+), 59 deletions(-)\n\n-- \n1.8.0.7.gbeffeda\n\n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"},{"id":"203084","messageId":"CABPQNSZe=oWEb-_orsGx1XFJh=sT3JpFVbOOwc=4=Agy9LreWg@mail.gmail.com","threadId":"32096","inReplyTo":"1352815288-3996-1-git-send-email-kusmabite@gmail.com","subject":"Re: [PATCH 0/5] win32: support echo for terminal-prompt","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2012-11-13T14:04:13Z","receivedAt":"2012-11-13T14:04:13Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"Sorry, I messed up the subject (lacking RFC-prefix), so I aborted\nafter sending the cover-letter. I'll resend with a proper prefix right\naway.\n\nOn Tue, Nov 13, 2012 at 3:01 PM, Erik Faye-Lund <kusmabite@gmail.com> wrote:\n> We currently only support getpass, which does not echo at all, for\n> git_terminal_prompt on Windows. The Windows console is perfectly\n> capable of doing this, so let's make it so.\n>\n> This implementation tries to reuse the /dev/tty-code as much as\n> possible.\n>\n> The big reason that this becomes a bit hairy is that Ctrl+C needs\n> to be handled correctly, so we don't leak the console state to a\n> non-echoing setting when a user aborts.\n>\n> Windows makes this bit a little bit tricky, in that we need to\n> implement SIGINT for fgetc. However, I suspect that this is a good\n> thing to do in the first place.\n>\n> An earlier iteration was also breifly discussed here:\n> http://mid.gmane.org/CABPQNSaUCEDU4+2N63n0k_XwSXOP_iFZG3GEYSPSBPcSVV8wRQ@mail.gmail.com\n>\n> The series can also be found here, only with an extra patch that\n> makes the (interactive) testing a bit easier:\n>\n> https://github.com/kusma/git/tree/work/terminal-cleanup\n>\n> Erik Faye-Lund (5):\n>   mingw: make fgetc raise SIGINT if apropriate\n>   compat/terminal: factor out echo-disabling\n>   compat/terminal: separate input and output handles\n>   mingw: reuse tty-version of git_terminal_prompt\n>   mingw: get rid of getpass implementation\n>\n>  compat/mingw.c    |  91 +++++++++++++++++++++++++++-----------\n>  compat/mingw.h    |   8 +++-\n>  compat/terminal.c | 129 ++++++++++++++++++++++++++++++++++++++++--------------\n>  3 files changed, 169 insertions(+), 59 deletions(-)\n>\n> --\n> 1.8.0.7.gbeffeda\n>\n\n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n"}]}