mirror of
https://github.com/git/git.git
synced 2024-12-11 19:03:50 +08:00
wincred: ignore unknown lines (do not die)
It is the expectation that credential helpers be liberal in what they accept and conservative in what they return, to allow for future growth and evolution of the protocol/interaction. All of the other helpers (store, cache, osxkeychain, libsecret, gnome-keyring) except `netrc` currently ignore any credential lines that are not recognised, whereas the Windows helper (wincred) instead dies. Fix the discrepancy and ignore unknown lines in the wincred helper. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
1b3d6e17fe
commit
d695804983
@ -278,8 +278,11 @@ static void read_credential(void)
|
||||
wusername = utf8_to_utf16_dup(v);
|
||||
} else if (!strcmp(buf, "password"))
|
||||
password = utf8_to_utf16_dup(v);
|
||||
else
|
||||
die("unrecognized input");
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user