-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
bugSomething isn't workingSomething isn't workinggh-browserelating to the gh browse commandrelating to the gh browse commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic
Description
gh --version
# gh version 2.31.0 (2023-06-20)Describe the bug
- run
gh browse --repo <OWNER_NAME> <FILE_PATH>from a git subdirectory, it messes up the URL
example
# move into a given 'git' repository, for example "cli"
cd cli
# run the gh browse command to open the "README" of "Zotero"
# it works correctly
gh browse --repo zotero/zotero README.md --no-browser
# https://github.com/zotero/zotero/tree/main/README.md
# move one directory level down in your 'git' repo
cd utils/
# run the same command again and notice 'utils' is wrongly placed within the link
gh browse --repo zotero/zotero README.md --no-browser
# https://github.com/zotero/zotero/tree/main/utils/README.mdbisect
- bisecting suggests: 70c78f2
# 70c78f2aa896f2c6baf9a045c087f1042fd4b62d is the first bad commit
# commit 70c78f2aa896f2c6baf9a045c087f1042fd4b62d
# Author: nate smith <vilmibm@github.com>
# Date: Thu Oct 14 17:07:51 2021 -0500
# some fixes, streamlining
# pkg/cmd/browse/browse.go | 56 ++++++++++-------------------
# pkg/cmd/browse/browse_test.go | 82 +++++++++++++------------------------------
# 2 files changed, 43 insertions(+), 95 deletions(-)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggh-browserelating to the gh browse commandrelating to the gh browse commandhelp wantedContributions welcomeContributions welcomep3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetic