Expand description
Repository path discovery.
Functions§
- git_dir
- Path to the
.gitdirectory of the repository containingcwd. Always returns an absolute path. Errors ifcwdisn’t inside a git repository. - lfs_
alternate_ dirs - LFS-objects directories belonging to alternate object stores
referenced by this repository. Used to satisfy a
git lfs smudgeorgit lfs fetchfrom agit clone --shared <source>checkout without re-downloading bytes the source already has. - lfs_dir
- Path to the LFS storage directory for the repository (
<git-dir>/lfs). The directory is not created. - work_
tree_ root - Path to the working-tree root of the repository containing
cwd. HonorsGIT_WORK_TREE, so this returns the right thing even whencwdis outside the work tree (e.g. tests that set bothGIT_DIRandGIT_WORK_TREEas relative paths from a parent dir). Errors for bare repos (no work tree) and outside-any-repo callers.