Skip to content

gh fails to find git directory in ntfs mounted drive #2960

@SamuelFountain

Description

@SamuelFountain

Describe the bug

A clear and concise description of what the bug is. Include version by typing gh --version.

running gh issue list from an ntfs mounted drive, gh fails to find the git repository.

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ gh --version
gh version 1.6.0-pre.3-67-ge949a247 (2021-02-13)
https://github.com/cli/cli/releases/latest

Steps to reproduce the behavior

Found on an OpenSUSE tumbleweed
Drive mounted with
UUID="" /run/media/sam/HDD ntfs-3g defaults 0 0

  1. Clone a GitHub repository into the mounted drive. (or copy an already clone repository into the mounted drive)
  2. Type this gh issue list
  3. View the output
fatal: not a git repository (or any of the parent directories): .git
/snap/gh/318/usr/bin/git: exit status 128

Expected vs actual behavior

Expected gh to open up a pager with the list of issues for this repository, instead get fatal: not a git repository error.

Tested first with a repository cloned to my home directory, git status shows it is a git directory, gh issue list works as expected. Copy the entire directory into the mounted Drive. git status shows it is still a git directory, gh issue list fails to recognize it as a directory.

Logs

Paste the activity from your command line. Redact if needed.

~ via ⬢ v14.15.4 via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ cd ~/repo-test

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ gh issue list

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB underwent 2s
➜ cd ..

~ via ⬢ v14.15.4 via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ cp -r repo-test /run/media/sam/HDD/Documents

~ via ⬢ v14.15.4 via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ cd /run/media/sam/HDD/Documents/repo-test

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
➜ gh issue list
fatal: not a git repository (or any of the parent directories): .git
/snap/gh/318/usr/bin/git: exit status 128

.⊣ repo-test on  master via 🐍 v3.8.7 via  4GiB/16GiB | 0B/2GiB
❯

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmore-info-neededMore info needed from user/contributor

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions