Skip to content

Missing support for repos with custom work tree location #2710

Description

@mike-shevchenko
  • Setup:
    • Windows 10.
    • Git dir: C:\Users\<user>\.home-git
    • Git config: core.bare=false, core.worktree=C:/Users/<user>
    • A .git file inside the git dir containing gitdir: . (otherwise Fork refuses to open the dir, which seems to be a bug on its own).
  • Action:
    • Open the dir in Fork: C:\Users\<user>\.home-git
    • NOTE: If git runs in that folder, it reports the top level as C:/Users/<user>, and all commands work.
  • Observed:
    • The Changes view lists modified files correctly (paths as git status --porcelain prints them, relative to the repository root), but every diff pane is empty, and "Open" from the context menu does nothing.
  • Cause (as far as it can be seen from outside):
    • Fork joins the root-relative paths from git status with the folder it opened, giving e.g. .home-git\bin\some_file, which does not exist. A path-taking git diff -- bin/some_file run from that folder is empty for the same reason, while git diff -- ../bin/some_file shows the change.
  • Expected:
    • Use git rev-parse --show-toplevel (or core.worktree) as the base for file paths, as git does; then repositories with a separate git directory work like any other.
  • Version: Fork 2.22.0.0, Git 2.55.0.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions