]> git.ipfire.org Git - thirdparty/git.git/commitdiff
osxkeychain: clarify that we ignore unknown lines
authorMatthew John Cheetham <mjcheetham@outlook.com>
Thu, 22 Sep 2022 16:59:34 +0000 (16:59 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Sep 2022 21:21:04 +0000 (14:21 -0700)
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>
contrib/credential/osxkeychain/git-credential-osxkeychain.c

index bf77748d602fec651661075cbd6dd32951d065d2..e29cc28779dbb846de8446d4dce3a86dfe0ece5f 100644 (file)
@@ -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.
+                */
        }
 }