Credentials helpers such as `git config credential.helper "store --file /path/to/credentials"` interpreted wrongly
The implementation of CredentialsHelper::add_command of git2-rs is different from that of the git CLI.
While git2-rs checks whether a command contains a / or \ anywhere, the git CLI checks whether the command is an absolute path (roughly whether it starts with / or \)
Compare https://github.com/rust-lang/git2-rs/blob/d1ae3b6c2d1200e7d82468af447fa66259225ecf/src/cred.rs#L302-L303 with https://github.com/git/git/blob/6a64ac7b014fa2cfa7a69af3c253bcd53a94b428/credential.c#L492-L493
This leads to rather surprise behaviour when using the store helper with a nontrivial --file argument. For example git config credential.helper "store --file /path/to/credentials" should be interpreted as git credential-store --file /path/to/credentials, but it is not .