Expand description
Submodule .git file resolution.
Functions§
- compute_
default_ submodule_ gitdir - Computes
submodule.<name>.gitdiras a path relative to the work tree when not already set. - connect_
submodule_ work_ tree_ and_ git_ dir - Writes the gitfile and
core.worktreefor a submodule using configuredsubmodule.<name>.gitdir. - ensure_
submodule_ gitdir_ config - Ensures
submodule.<name>.gitdirexists, writing it viacompute_default_submodule_gitdirif needed. - hash_
blob_ sha1_ hex - Returns the 40-character hex SHA-1 of a blob object for
data(same asgit hash-object). - init_
submodule_ head_ from_ gitlink - If
modules_dir/HEADis missing, sets it tooid_hexwhen that commit exists inobjects/. - is_
git_ directory - Returns true if
pathlooks like a git directory (HEADandobjects/exist). - migrate_
gitdir_ configs - Migrates legacy submodule dirs under
.git/modules/: setssubmodule.*.gitdirand enables the extension. - path_
inside_ indexed_ submodule - Returns true if
new_pathis strictly inside a gitlink path recorded inindex(stage 0). - path_
inside_ registered_ submodule - Returns true if
new_pathis under a submodule path declared in.gitmodules. - path_
inside_ registered_ submodule_ name - True when
new_pathis the same as or nested under a.gitmodulessubmodule name (thesubmodule.<name>.*section name), which may contain/. - registered_
submodule_ paths - Paths declared in
.gitmodules(submodule.*.path), normalized with/. - set_
submodule_ repo_ worktree - Sets
core.worktreein the submodule repo atmodules_dir. - submodule_
gitdir_ filesystem_ path - Resolves the absolute filesystem path of a submodule’s git directory.
- validate_
encoded_ submodule_ git_ dir - Validates an encoded submodule gitdir path when
submodulePathConfigis enabled. - validate_
submodule_ path - Rejects submodule paths that traverse symlinks (Git
validate_submodule_path). - write_
submodule_ gitfile - Writes
sub_worktree/.gitas a gitfile pointing atmodules_dir(relative when possible).