git2-rs
git2-rs copied to clipboard
Fix CredentialHelper::add_command
Previously the add_helper function would check whether the command contains a \ or / character to determine whether it is absolute. It should have used starts_with instead of contains. In addition an absolute on Windows a path my start with a drive letter. The git cli implements this by checking if the second character is a ':'.
See also: https://github.com/git/git/blob/6a64ac7b014fa2cfa7a69af3c253bcd53a94b428/credential.c#L492-L493
Fixes https://github.com/rust-lang/git2-rs/issues/1136