Skip to content

gh browse --branch doesn't open repo home #4666

@zachliu

Description

@zachliu

Describe the bug

i just found this strange behavior under gh 2.2.0:

gh browse goes to the repo home no matter how deep i am in the repo directories, which is expected

however

gh browse --branch <branch-name> opens the current directory 🤔

Steps to reproduce the behavior

  1. Type this gh browse --branch <branch-name> in one of your repo's non-root directories
  2. The browser goes to that directory

Expected vs actual behavior

gh browse --branch <branch-name> should open repo's <branch-name> home page

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issuehelp wantedContributions welcomepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions