Message ID | ce1c1d66-e0eb-4143-b334-1a83c0492415@ramsayjones.plus.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d4dc0efd7d4b71acadae61f619b9e84f97d15c83 |
Headers | show |
Series | [v2] compat/terminal: mark parameter of git_terminal_prompt() UNUSED | expand |
On Sat, Aug 31, 2024 at 03:58:56PM +0100, Ramsay Jones wrote: > Sorry for being a bit tardy with this, but I'm up-to-my-ears! :) Well, then I don't feel so bad about being late to respond. :) > I feel a bit sheepish about taking authorship of this patch, since Jeff > contributed way more than I did to the text! (I was going to count the > words to get a better metric, but I have to go out now; if I don't send > this now it will be tomorrow ...). This looks great to me, and I think the authorship is fine as it is. The hard part IMHO was finding the problem in the first place! -Peff
diff --git a/compat/terminal.c b/compat/terminal.c index 0afda730f2..d54efa1c5d 100644 --- a/compat/terminal.c +++ b/compat/terminal.c @@ -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); }
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> --- Hi, Sorry for being a bit tardy with this, but I'm up-to-my-ears! :) I feel a bit sheepish about taking authorship of this patch, since Jeff contributed way more than I did to the text! (I was going to count the words to get a better metric, but I have to go out now; if I don't send this now it will be tomorrow ...). ATB, Ramsay Jones compat/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)