credential: avoid erasing distinct password

Test that credential helpers do not erase a password distinct from the
input. Such calls can happen when multiple credential helpers are
configured.

Fixes for credential-cache and credential-store.

Signed-off-by: M Hickford <mirth.hickford@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
M Hickford
2023-06-15 19:19:32 +00:00
committed by Junio C Hamano
parent fe86abd751
commit aeb21ce22e
5 changed files with 90 additions and 18 deletions

View File

@ -211,6 +211,6 @@ void credential_from_url(struct credential *, const char *url);
int credential_from_url_gently(struct credential *, const char *url, int quiet);
int credential_match(const struct credential *want,
const struct credential *have);
const struct credential *have, int match_password);
#endif /* CREDENTIAL_H */