Skip to content

Can't check out collaborator PR when on contributor branch #4056

Closed

Description

@niik

I was adding some commits to #4042 which is a contributor (i.e. external/fork) PR. Checking out the branch worked as expected but now I'm stuck and can't switch to a collaborator (i.e. origin) PR.

checkout-while-on-contributor

Notice how it's fetching the contributor fork when it should be fetching origin.

Log

[AppStore.withAuthenticatingUser] account found for repository: desktop - niik (has token)
Executing fetch: git -c credential.helper= fetch --progress --prune github-desktop-crea7or
Executing getStatus: git status --untracked-files=all --branch --porcelain=2 -z
Executing getBranches: git for-each-ref --format=%(refname)%00%(refname:short)%00%(upstream:short)%00%(objectname)%00%(author)%00%(committer)%00%(parent)%00%(symref)%00%(subject)%00%(body)%00%(trailers:unfold,only)%00%1F refs/heads refs/remotes
Executing getRecentBranches: git log -g --no-abbrev-commit --pretty=oneline HEAD -n 2500 --

This is the (pruned) log output from when I click on the origin PR. Notice how it fetches the wrong remote and how it never checks out the branch.

Since I haven't fetched origin since the PR was created I don't have the #4052 branch locally so my theory is that we fail (gracefully) because of that.

Activity

  1. added
    bug
    on Feb 20, 2018
  2. added this to the 1.1 milestone on Feb 20, 2018
  3. self-assigned this
    on Feb 20, 2018
  4. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  5. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions