Skip to content

Excuting "gh browse gh browse -c -R owner/repo" inside another repo workspace uses the last commit of the workspace repo #4715

@crguezl

Description

@crguezl

Describe the bug

When executing gh browse gh browse -c -R owner/repo inside the work tree of another repo uses the last commit of the workspace repo:

Example

➜  gh-learning git:(master) ✗ gh browse -c -R ULL-MFP-AET-2122/static-generator-angel-ramallobenitez-alu0100312898 -n
https://github.com/ULL-MFP-AET-2122/static-generator-angel-ramallobenitez-alu0100312898/tree/a27a1db2a3a10fae176024bf13444f27af44c7d0/gh-learning

That is the last commit of the current repo:

➜  gh-learning git:(master) ✗ git log -n 1
commit a27a1db2a3a10fae176024bf13444f27af44c7d0 (HEAD -> master)
Author: Casiano Rodriguez-Leon <crguezl@ull.edu.es>
Date:   Fri May 14 11:08:29 2021 +0100

    Auto-commit

Of course if we omit the -n option we get the 404:

Captura de pantalla 2021-11-12 a las 8 38 28

Expected behavior

It has to use the last commit of the repo specified in the command line argument -R owner/repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomep3Affects 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