]> git.ipfire.org Git - thirdparty/git.git/commitdiff
compat/terminal: mark parameter of git_terminal_prompt() UNUSED
authorRamsay Jones <ramsay@ramsayjones.plus.com>
Sat, 31 Aug 2024 14:58:56 +0000 (15:58 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 1 Sep 2024 15:26:51 +0000 (08:26 -0700)
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.

Co-authored-by: Jeff King <peff@peff.net>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/terminal.c

index 0afda730f278cc776e430ca6b5f44712d5b27f7b..d54efa1c5d6ebf63274b4878bc69be9db09a7124 100644 (file)
@@ -594,7 +594,7 @@ void restore_term(void)
 {
 }
 
-char *git_terminal_prompt(const char *prompt, int echo)
+char *git_terminal_prompt(const char *prompt, int echo UNUSED)
 {
        return getpass(prompt);
 }