diff options
author | Matthew John Cheetham <mjcheetham@outlook.com> | 2022-09-22 18:59:34 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-22 23:21:04 +0200 |
commit | 630a6429a71118332ec3bc5aa58fce66df6ca5fa (patch) | |
tree | f51e5e450dbdcac154ee1a13b6e8928790f42ed6 /contrib/credential/osxkeychain | |
parent | netrc: ignore unknown lines (do not die) (diff) | |
download | git-630a6429a71118332ec3bc5aa58fce66df6ca5fa.tar.xz git-630a6429a71118332ec3bc5aa58fce66df6ca5fa.zip |
osxkeychain: clarify that we ignore unknown lines
Like in all the other credential helpers, the osxkeychain helper
ignores unknown credential lines.
Add a comment (a la the other helpers) to make it clear and explicit
that this is the desired behaviour.
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/credential/osxkeychain')
-rw-r--r-- | contrib/credential/osxkeychain/git-credential-osxkeychain.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c index bf77748d60..e29cc28779 100644 --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c @@ -159,6 +159,11 @@ static void read_credential(void) username = xstrdup(v); else if (!strcmp(buf, "password")) password = xstrdup(v); + /* + * Ignore other lines; we don't know what they mean, but + * this future-proofs us when later versions of git do + * learn new lines, and the helpers are updated to match. + */ } } |