On Fri, May 20, 2011 at 7:18 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Erik Faye-Lund <kusmabite@xxxxxxxxx> 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 :) -- 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