Re: [PATCH] compat/terminal: mark parameter of git_terminal_prompt() UNUSED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 31, 2024 at 02:40:22AM +0100, Ramsay Jones wrote:

> > Here's a potential commit message for the patch:
> > 
> >   If neither HAVE_DEV_TTY nor GIT_WINDOWS_NATIVE is set, the fallback
> >   code calls the system getpass(). This unfortunately ignores the "echo"
> >   boolean parameter, as we have no way to implement that functionality.
> >   But we still have to keep the unused parameter, since our interface
> >   has to match the other implementations.
> 
> Yes, this reads well. Do you want to send an updated patch or shall I?

I assumed you would. Thanks!

> > As an aside, I wonder if cygwin could be using either /dev/tty or the
> > Windows variant. But that's obviously a separate patch, and either way
> > we'd want to fix this fallback code in the meantime.
> 
> Yes, this is what I meant by '... it should not even be trying to compile
> that code ...' ;) ie I was expecting HAVE_DEV_TTY to be set on cygwin (which
> does have /dev/tty).
> 
> However, there may be reasons for it not being set - I haven't had time to
> look into it yet.

I doubt there is a good reason. When I introduced HAVE_DEV_TTY ages ago
(2011, apparently!) I kept the conservative default as-is to avoid
disrupting other platforms. So I suspect it is simply that nobody on
Cygwin noticed the lousy fallback behavior, or knew that there was an
alternative (the most obvious problem is that when we prompt for a
username, what the user types is not visible).

Testing welcome, of course. :)

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux