All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Faye-Lund <kusmabite@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Rafael Gieschke <rafael@gieschke.de>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] compat: add a getpass() compatibility function
Date: Fri, 20 May 2011 19:26:42 +0200	[thread overview]
Message-ID: <BANLkTinX2Nvq9OtDs6DGdtE7qFL9QjZTbw@mail.gmail.com> (raw)
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:
> 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 :)

  reply	other threads:[~2011-05-20 17:27 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 11:37 [PATCH] compat: add a getpass() compatibility function Rafael Gieschke
2011-05-19 12:17 ` Erik Faye-Lund
2011-05-19 16:30   ` Junio C Hamano
2011-05-19 17:01   ` Rafael Gieschke
2011-05-19 17:27     ` Junio C Hamano
2011-05-19 18:07       ` Erik Faye-Lund
2011-05-19 19:16         ` Rafael Gieschke
2011-05-19 19:19           ` Erik Faye-Lund
2011-05-19 19:42             ` Rafael Gieschke
2011-05-19 20:12               ` Erik Faye-Lund
2011-05-19 21:16                 ` Erik Faye-Lund
2011-05-20 10:06                   ` Rafael Gieschke
2011-05-20 10:48                     ` Erik Faye-Lund
2011-05-20 17:18                       ` Junio C Hamano
2011-05-20 17:26                         ` Erik Faye-Lund [this message]
2011-05-19 12:21 ` Erik Faye-Lund
2011-05-19 15:14   ` Jonathan Nieder
2011-05-19 15:29     ` Erik Faye-Lund
2011-05-19 17:17     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTinX2Nvq9OtDs6DGdtE7qFL9QjZTbw@mail.gmail.com \
    --to=kusmabite@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rafael@gieschke.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.