Skip to content

Snap strict confinement: GitUI misreports repository NotFound as “non-bare repository” #2866

@Yi2255

Description

@Yi2255

Describe the bug
Using the snap version of gitui in strict confinement mode, running gitui in a valid non-bare repository outside snap-allowed paths (for example /i4) shows a misleading error:

invalid path
please run gitui inside of a non-bare git repository

The repository is actually non-bare. The real issue is repository discovery failure (NotFound), not a bare-repository problem.

To Reproduce
Steps to reproduce the behavior:

  1. Install gitui from snap:
    snap install gitui
  2. Create a repository outside /home (for example /i4/repo):
    mkdir -p /i4/repo
    cd /i4/repo
    git init
  3. Verify the repository is non-bare:
    git rev-parse --is-bare-repository
    (output should be false)
  4. Run gitui and see error.

Expected behavior
gitui should report the actual cause (repository open/discovery failure due to snap strict path confinement), instead of incorrectly telling users to run inside a non-bare repository.

Screenshots
N/A. Terminal output is included above.

Context (please complete the following information):

  • OS/Distro + Version: Ubuntu 24.04.3 LTS
  • GitUI Version [e.g. 0.5]: snap package (strict confinement)
  • Rust version: N/A (prebuilt snap binary)

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions