Skip to content

Commit

Permalink
compat/terminal: mark parameter of git_terminal_prompt() UNUSED
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
2 people authored and gitster committed Sep 1, 2024
1 parent 39bf06a commit d4dc0ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compat/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d4dc0ef

Please sign in to comment.