-
Notifications
You must be signed in to change notification settings - Fork 426
Closed
Description
git_checkout_head has the following disclaimer:
Note that this is not the correct mechanism used to switch branches; do not change your HEAD and then call this method, that would leave you with checkout conflicts since your working directory would then appear to be dirty. Instead, checkout the target of the branch and then update HEAD using git_repository_set_head to point to the branch you checked out.
This should be translated to make sense with the rust api and included.
In my usecase git_checkout_head was doing literally nothing and it was very confusing.
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs(rust-lang#1148): Add note regarding potentially confusing behavi…
git_checkout_head. #1149vcfxb commentedon Mar 25, 2025
@lolbinarycat feel free to review & make comments on #1149
docs(rust-lang#1148): Add note regarding potentially confusing behavi…
Merge pull request #1149 from vcfxb/venus/1148