Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew John Cheetham <mjcheetham@outlook.com>2022-09-22 19:59:34 +0300
committerJunio C Hamano <gitster@pobox.com>2022-09-23 00:21:04 +0300
commit630a6429a71118332ec3bc5aa58fce66df6ca5fa (patch)
treef51e5e450dbdcac154ee1a13b6e8928790f42ed6 /contrib
parent6ea87d97af30c25ce48b524943ec9493bd5e51ca (diff)
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')
-rw-r--r--contrib/credential/osxkeychain/git-credential-osxkeychain.c5
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.
+ */
}
}