Skip to content

"Open in Remote" commands should check for branch upstream tracking #201

@srenatus

Description

@srenatus
  • GitLens Version: 6.1.0
  • VSCode Version: 1.18.0
  • OS Version: osx sierra

Steps to Reproduce:

  1. for some repository, unset the upstream tracking of the checkout out branch: git branch --unset-upstream my/branch
  2. for some file (path/to/foo.file) of that branch, click Open File in Remote

⏩ It will open https://github.com/org/repo/blob/fatal:%20no%20upstream%20configured%20for%20branch%20'my/branch'/path/to/foo.file#L203

It thus seems like the checks guarding Open File in Remote, gitlens:activeIsTracked && gitlens:activeHasRemotes are not enough: There also needs to be a check like activeIsTrackingUpstreamBranch -- alternatively, the exit code should be checked before opening the URL.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions