Hi Raman,
Here's the contents of that .git file in settings-internal is:
gitdir: ../.git/modules/settings-internal
The root is called "braincloud-deploy". The "braincloud" dir higher up in my path is just a folder on my system to collect the independent braincloud projects. It isn't a git repo itself.
I am able to navigate properly to the relative path
So the path I end up in is /Users/winterhalder/bitheads/projects/braincloud/braincloud-deploy/.git/modules/settings-internal
And the [core] contents of config - including the "worktree" property is:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
worktree = ../../../settings-internal
(And note - cd'ing to that relative path does get me back into the proper directory)
I hope that helps (and that I followed your instructions properly).
And no problem with the detailed instructions - I'm happy that you are looking into it! And I appreciate that this is tough to track down. It is good to know that something changed in processing the "worktree"
Certainly the five ".." in the paths SourceTree 4.2.3 is calculating match the fact that "braincloud-deploy" is 5 levels deep.
I wonder if it might have something to do with case.
Although at the command line, my path to braincloud-deploy looks like this:
/Users/winterhalder/bitheads/projects/braincloud/braincloud-deploy
When viewed through MacOS finder - the path directories look like this:
/Users/winterhalder/bitHeads/Projects/brainCloud/braincloud-deploy
(Note the capitals in bit"H"eads, "P"rojects, brain"C"loud...)
You'll not that the subrepo has ignorecase=true - and I just checked - ignorecase = true is also specified in the root repo.
But maybe somewhere in your code you're checking paths and you aren't lowercase everything before the compare - maybe? (Just a thought)
Hi, 686526b84cba
Thanks for comment. I admit that in 4.2.4 it still may occur in one case (when your repo is being reopened after reopening Sourcetree, other words repo window restoration mechanism).
But, good news, we already added corresponding enhancements which intended to cover this case too. These enhancements will re available in the next release.
Thanks and glad to hear you was able to resolve your issue using provided workaround.