![]() The old approach of reading .git/HEAD does not work when using git worktrees, where the folder layout looks roughly like: solvespace.git/ - bare clone (.git dir) solvespace.git/work - example worktree containing master solvespage.git/worktrees/work/ - .git dir of worktree solvespage.git/worktrees/work/HEAD - actual HEAD ref for master First attempt was to just get GIT_ROOT from `git rev-parse --git-dir` but that wasn't enough, since: 1. GIT_ROOT points to solvespage.git/worktrees/work/ 2. GIT_ROOT/HEAD points to refs/heads/master 3. GIT_ROOT/refs/heads/master does not exist but the old implementation would want to use this to get the sha so we need two invocations of git rev-parse 1. `git rev-parse --git-dir` to get GIT_DIR needed for setting GIT_DEPENDS 2. `git rev-parse HEAD` to get the sha of the worktree's HEAD |
||
---|---|---|
.. | ||
AddVendoredSubdirectory.cmake | ||
c_flag_overrides.cmake | ||
cxx_flag_overrides.cmake | ||
DisableWarnings.cmake | ||
FindSpaceWare.cmake | ||
FindVendoredPackage.cmake | ||
GetGitCommitHash.cmake | ||
libpng-macos-arm64.patch | ||
MacOSXBundleInfo.plist.in | ||
Toolchain-mingw32.cmake | ||
Toolchain-mingw64.cmake |