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

Re: [PATCH] compat: add a getpass() compatibility function

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
May 20, 2011, 17:26 UTC
Message-ID
<BANLkTinX2Nvq9OtDs6DGdtE7qFL9QjZTbw@mail.gmail.com>
In-Reply-To
<7vtycp2sva.fsf@alter.siamese.dyndns.org>
On Fri, May 20, 2011 at 7:18 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 8 quoted lines
> Erik Faye-Lund <kusmabite@gmail.com> writes:
>> Instead,
>> we should make our own function (based on your most recent patch?)
>> that fills a caller-specified strbuf instead (git_getpass already have
>> a static strbuf that we can fill).
>
> Heh, I thought you earlier felt "a bit pointless" to "a properly
> abstracted common version" I outlined earlier in the thread ;-)

Well, if we're going to change git_getpass to not use getpass, then we need to do something; the mingw-version is a getpass-interface.

Sure, we could continue to use the getpass-interface for the POSIX-version, but it feels silly to limit the password-length when we could just pass in that strbuf that is already there (for the GIT_GETPASS-case). The Windows-version still should be fixed to avoid the leak that is already there - passing the strbuf in from the caller would solve that.

I'm fine with just having two implementations, one for POSIX and one for Windows. In fact, that's probably the right thing to do; my experiment lead to more lines of code, not less.

My patches were more of an experiment than a proposal :)
Previous: Junio C HamanoNext: Erik Faye-Lund
Message 15 of 19 in “compat: add a getpass() compatibility function”
  1. compat: add a getpass() compatibility functionRafael Gieschke, May 19, 2011
  2. Erik Faye-LundMay 19, 2011
  3. Junio C HamanoMay 19, 2011
  4. Rafael GieschkeMay 19, 2011
  5. Junio C HamanoMay 19, 2011
  6. Erik Faye-LundMay 19, 2011
  7. Rafael GieschkeMay 19, 2011
  8. Erik Faye-LundMay 19, 2011
  9. Rafael GieschkeMay 19, 2011
  10. Erik Faye-LundMay 19, 2011
  11. Erik Faye-LundMay 19, 2011
  12. Rafael GieschkeMay 20, 2011
  13. Erik Faye-LundMay 20, 2011
  14. Junio C HamanoMay 20, 2011
  15. Erik Faye-LundMay 20, 2011
  16. Erik Faye-LundMay 19, 2011
  17. Jonathan NiederMay 19, 2011
  18. Erik Faye-LundMay 19, 2011
  19. Junio C HamanoMay 19, 2011

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.