Skip to main content

build_tree

Function build_tree 

Source
pub fn build_tree(store: &ObjectStore, dir: &Path) -> WorktreeResult<Hash>
Expand description

Build a tree object for dir and its subdirectories. Honours the .gitignore + .mkitignore ignore files loaded from dir.

Ignore rules only exclude untracked content: a path that is tracked (or whose subtree holds tracked content) is always included even if it matches an ignore rule, so a tracked file matching .gitignore is never dropped from the worktree snapshot (which would misreport it as a deletion in status/diff). The staging index at <dir>/.mkit/index provides the tracked set; an absent index means nothing is tracked.

ยงErrors

See WorktreeError.