Skip to content

checkout_head is missing disclaimer #1148

Open
@lolbinarycat

Description

@lolbinarycat

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions