Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Repository::checkoutReference doesn't work with remote or tag references #50

Description

@olmokramer

Redirected here from atom/atom#7973

The following works just fine

repository.checkoutReference('refs/heads/branch');

But when I have a remote branch named remote-branch on the origin remote and I try

repository.checkoutReference('refs/remotes/origin/remote-branch');

It fails to check out the remote branch. The same is true for tags. Apparently, it will only check out local branches:

Repository::checkoutReference= (branch, create)->ifbranch.indexOf('refs/heads/') isnt0branch="refs/heads/#{branch}"@checkoutRef(branch, create)

What's the reason for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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