Skip to content

gh pr create fails to find a .git directory with -R flag #5906

@bodqhrohro

Description

@bodqhrohro

Describe the bug

@bq:23:27:20:/tmp/dl$ gh --version
gh version 2.12.1+dfsg1 (2022-06-17 Debian 2.12.1+dfsg1-1)
https://github.com/cli/cli/releases/latest

Steps to reproduce the behavior

  1. Push to a branch of a fork of a primary repository.
  2. Try to make a PR from other machine in an arbitrary current directory.

Expected vs actual behavior

I expect it to work without even cloning the repository locally, in any current directory, like other commands with the -R flag do.

It seems to be a very old bug, as I had the 1.14.0 version before, not upgraded for a long time, and experienced the same error there.

Logs

@bq:23:25:45:/tmp/dl$ LANG=C gh pr create -R FluuxIO/go-xmpp -H bodqhrohro/go-xmpp:disco_info_form -B master
fatal: not a git repository (or any of the parent directories): .git
/usr/bin/git: exit status 128

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomep2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions