Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CredentialHelper::add_command #1137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aibaars
Copy link

@aibaars aibaars commented Mar 5, 2025

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 #1136

@rustbot rustbot added the S-waiting-on-review Status: Waiting on review label Mar 5, 2025
@aibaars aibaars force-pushed the fix-credential-helper branch from 16bd0dc to ef3bca9 Compare March 10, 2025 10:41
@aibaars aibaars force-pushed the fix-credential-helper branch from ef3bca9 to c776e8d Compare March 10, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting on review
Projects
None yet
2 participants