Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Clarification on git_reference_create_matching documentation #7224

@FintanH

Description

@FintanH

Hey,

I'm reading the documentation for git_reference_create_matching, and I'd like to clarify my understanding of it.

In one paragraph we have:

This function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.

But then, two paragraphs below we have:

It will return GIT_EMODIFIED if the reference's value at the time of updating does not match the one passed through current_id (i.e. if the ref has changed since the user read it).

Would the reference not need to exist to check the matching value?

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