-
Bug
-
Resolution: Fixed
-
Medium
-
2.2.4
-
None
SourceTree is unable to perform most tasks on files when using the core.worktree config option to redirect the location of the working copy away from the location of the git repo. This is useful for example when you want to track your HOME dir in a git repo, but locate the git repo itself in another subpath in order to avoid having any git commands outside any other git repo defaulting to this HOME dir git repo by accident.
For example, you might do the following:
git init ~/repos/homedir cd ~/repos/homedir git config core.worktree ../../ git add ../../.bash_profile
Notice how the git add command needs to point at the actual relative location of the file. This is the path that will also show when you run git status, however if you run git status --porcelain then the ../../ prefix is not displayed, showing the path relative to the worktree, not the location of the git repo. Since SourceTree uses the --porcelain option, using those file paths directly in other git commands fails with pathspec did not match any files kind of errors.
In order to fix this usage scenario SourceTree needs to detect the core.worktree setting and adjust paths accordingly.
- blocks
-
SRCTREE-95 Failed to load
Form Name |
---|
Is this working in the Mac version? It's been broken for years in the Windows client and is still broken in v3.4.5 (I just tested it)