Skip to content

Commit 630a642

Browse files
mjcheethamgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6ea87d9 commit 630a642

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/credential/osxkeychain/git-credential-osxkeychain.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ static void read_credential(void)
159159
username = xstrdup(v);
160160
else if (!strcmp(buf, "password"))
161161
password = xstrdup(v);
162+
/*
163+
* Ignore other lines; we don't know what they mean, but
164+
* this future-proofs us when later versions of git do
165+
* learn new lines, and the helpers are updated to match.
166+
*/
162167
}
163168
}
164169

0 commit comments

Comments
 (0)