Skip to main content

Crate sley_worktree

Crate sley_worktree 

Source

Structs§

ApplySparseResult
AtomicMetadataWriteOptions
AtomicMetadataWriteResult
AttributeCheck
CacheInfoEntry
CheckoutIndexPathOptions
CheckoutResult
EolInfo
The three ls-files --eol fields for a single path.
IgnoreMatch
IndexStatProbe
Stage-0 index stat data that can prove a worktree path clean without re-reading and re-hashing it.
IndexStatProbeCache
Reusable stage-0 index stat probes for many worktree paths.
MoveDetail
MoveOptions
MoveResult
PathspecMatchMagic
Pathspec match magic, mirroring git’s PATHSPEC_LITERAL/PATHSPEC_GLOB/ PATHSPEC_ICASE. Constructed from the global --{glob,noglob,icase,literal}-pathspecs options. Drives pathspec_item_matches.
RemoveOptions
RemoveResult
RestoreResult
SharedSymrefWorktree
ShortStatusEntry
ShortStatusOptions
ShortStatusRow
SparseCheckout
StandardAttributeMatcher
A reusable matcher for standard worktree attributes (global or core.attributesFile, every in-tree .gitattributes, and $GIT_DIR/info/attributes).
SubmoduleStatus
Submodule-specific change detail for a status entry, mirroring upstream’s wt_status_change_data trio: new_submodule_commits plus the DIRTY_SUBMODULE_MODIFIED/DIRTY_SUBMODULE_UNTRACKED dirty bits.
TreeAttributes
A reusable handle that captures a tree’s .gitattributes chain once so repeated smudge-filter calls (e.g. git archive streaming every blob in a tree) resolve attributes from the tree being processed rather than the live worktree.
UntrackedPathOptions
UntrackedPathspecFilter
Pathspec filter for untracked collection. Mirrors git ls-files pathspec semantics: literal paths, recursive directory prefixes, and fnmatch globs.
UpdateIndexOptions
Batch-wide options for the git add-style callers that apply one uniform mode to every path. The positional add/remove/force_remove/info_only/ chmod fields describe that uniform mode; ignore_skip_worktree_entries is a genuine whole-invocation toggle (it is not positional in git either).
UpdateIndexPath
UpdateIndexPathMode
A single positional path passed to update-index, together with the mode that was active at the point the path was seen on the command line.
UpdateIndexResult
WorktreeAttributes
A reusable handle that captures the worktree’s .gitattributes chain once so repeated clean-filter calls (e.g. hash-object --stdin-paths hashing many paths in one process) don’t re-walk the worktree and re-read every .gitattributes/global config per path.
WriteTreeOptions

Enums§

AddExactTrackedPathResult
AddUpdateTrackedAction
AttributeState
CheckoutConflictStyle
CheckoutStage
ConvFlags
The core.safecrlf round-trip-warning mode, mirroring git’s global_conv_flags_eol (environment.c). git’s default — when core.safecrlf is unset — is ConvFlags::Warn, so the warning fires even without any explicit config.
IndexInfoRecord
SafeCrlfIndexBlob
How the safecrlf check should learn whether this path’s current index blob already contains a CRLF (git’s has_crlf_in_index). Only consulted on the text=auto / core.autocrlf path.
SparseCheckoutMode
Selects how the patterns in a SparseCheckout are interpreted when deciding which index paths are “in cone” (kept in the worktree).
StatusIgnoredMode
StatusUntrackedMode
StreamControl
WorktreeEntryState
The worktree state of one tracked path relative to an expected index/tree entry.
WorktreeStatus

Constants§

DIRTY_SUBMODULE_MODIFIED
Bit set in a submodule dirt mask when the submodule has staged or unstaged changes to tracked files (upstream DIRTY_SUBMODULE_MODIFIED).
DIRTY_SUBMODULE_UNTRACKED
Bit set in a submodule dirt mask when the submodule has untracked files (upstream DIRTY_SUBMODULE_UNTRACKED).
WM_CASEFOLD
Case-insensitive match flag (git WM_CASEFOLD).
WM_PATHNAME
Pathname-aware match flag (git WM_PATHNAME): */? do not cross /, ** is required to span directory separators.

Traits§

WorktreeScanner

Functions§

add_exact_tracked_path_from_disk
add_exact_tracked_path_with_index
add_paths_to_index
add_paths_to_index_filtered
Like add_paths_to_index, but runs the configured content filters (core.autocrlf/text/eol EOL conversion and filter.<name>.clean drivers) on each file’s contents before hashing it into the object store.
add_update_all_tracked_filtered
apply_clean_filter
Apply the clean conversion to content for path (worktree -> blob): first the configured filter.<name>.clean driver (if any), then CRLF->LF normalization when EOL conversion applies.
apply_clean_filter_with_attributes
Like apply_clean_filter but takes already-resolved attribute checks, letting callers that have computed attributes once reuse them.
apply_clean_filter_with_attributes_cow
Borrow-first variant of apply_clean_filter_with_attributes.
apply_clean_filter_with_attributes_cow_safecrlf
apply_clean_filter_with_attributes_cow plus git’s additive core.safecrlf round-trip warning (convert.c crlf_to_git).
apply_smudge_filter
Apply the smudge conversion to content for path (blob -> worktree): first LF->CRLF when EOL conversion applies, then the configured filter.<name>.smudge driver (if any).
apply_smudge_filter_with_attributes
Like apply_smudge_filter but takes already-resolved attribute checks.
apply_smudge_filter_with_attributes_cow
Borrow-first variant of apply_smudge_filter_with_attributes.
apply_sparse_checkout
Conflicted entries (stage != 0) are never given the skip-worktree bit and are left alone, matching upstream Git. The index is rewritten in place.
apply_sparse_checkout_with_mode
Like apply_sparse_checkout but lets the caller force the pattern interpretation instead of auto-detecting it.
checkout_branch
checkout_branch_filtered
Like checkout_branch, but runs the smudge-side content filters (core.autocrlf/text/eol EOL conversion and filter.<name>.smudge drivers) on each blob as it is written to the worktree. config is the repository config used to resolve the filters.
checkout_detached
checkout_detached_filtered
Like checkout_detached, but runs the smudge-side content filters (see checkout_branch_filtered).
checkout_detached_sparse
Checks out target like checkout_detached, but materializes the worktree through the supplied SparseCheckout: out-of-cone paths are not written, get their skip-worktree bit set, and have any stale worktree file removed. Existing public checkout entry points are unchanged; this is an additive sparse-aware variant.
checkout_index_paths
checkout_tree_to_index_and_worktree
Materialize a tree object into the index and worktree.
clear_resolve_undo
common_git_dir_for_git_dir
deleted_index_entries
disable_split_index
disable_untracked_cache
emit_untracked_cache_bypass_trace
enable_split_index
enable_untracked_cache
eol_attribute_checks
Resolve the crlf/eol/text/filter attributes for path from the worktree .gitattributes chain (the set ls-files --eol needs for its attr/ field).
eol_info_for_path
Compute the ls-files --eol info for path.
expand_sparse_index
Expands every sparse-directory entry in index back into the full set of blob (and nested-directory) entries it collapses, reading each directory’s tree from db. After this the index contains no sparse-directory entries and carries no sdir marker — it is a full index that any per-path command can operate on without sparse-index awareness.
find_shared_symref
force_write_index
ignored_index_entries
index_from_tree
Build a fresh in-memory index that mirrors the tree tree_oid, the way git read-tree <tree> does: every blob, symlink, and gitlink leaf (found by recursing subtrees) becomes a stage-0 entry carrying the tree mode and oid, with a fully zeroed stat (so nothing is treated as stat-clean) and size 0. Entries are sorted by path; the index is version 2 with no extensions.
index_skip_hash_from_config
Whether config requests a null trailing index hash. git’s repo-settings: feature.manyFiles defaults skip-hash on, and an explicit index.skipHash (last) overrides it.
is_shallow_repository
Whether the repository at git_dir is shallow — i.e. it has a shallow file recording grafted commit boundaries (git clone --depth).
modified_index_entries
move_index_and_worktree_path
path_in_sparse_checkout
Enforces a SparseCheckout against the current index and worktree.
path_matches_ignore
path_matches_ignore_with_per_directory
path_matches_standard_ignore
pathspec_is_glob
True if path contains a glob-special character.
pathspec_item_matches
Port of git’s match_pathspec_item for the single-pathspec / single-name case (no prefix, no attr magic). match_ is the pathspec, name is the candidate path. Returns whether the pathspec selects name (exactly, as a directory prefix, or via wildmatch). Byte-for-byte faithful to git 2.54 for the ls-files -- <pathspec> path that t3070 exercises.
read_repository_index
refresh_index_paths
refresh_untracked_cache_after_status
remove_index_and_worktree_paths
repository_index_path
reset_index_and_worktree_to_commit
reset_index_to_commit
restore_index_and_worktree_paths_from_head
restore_index_and_worktree_paths_from_tree
restore_index_paths_from_head
restore_index_paths_from_tree
restore_index_paths_from_tree_allow_unmatched
restore_worktree_paths
restore_worktree_paths_filtered
Like restore_worktree_paths, applying the smudge-side content filters (CRLF / ident / filter drivers) the way a checkout writes blobs.
restore_worktree_paths_from_head
restore_worktree_paths_from_tree
set_index_assume_unchanged_paths
set_index_fsmonitor_valid_paths
set_index_skip_worktree_paths
set_index_version
short_status_count
short_status_count_with_options
standard_attributes_for_path
standard_attributes_for_path_from_index
standard_attributes_for_path_from_tree
standard_attributes_for_path_in_repo
standard_ignore_match
stream_short_status
stream_short_status_with_options
submodule_dirt
Inspect the working state of the submodule whose worktree is at sub_root and report its dirt mask: DIRTY_SUBMODULE_MODIFIED for staged/unstaged changes to tracked files, DIRTY_SUBMODULE_UNTRACKED for untracked files. Returns 0 for a clean submodule — and for a directory that is not a populated repository at all (upstream treats an unpopulated gitlink as always unchanged). The native equivalent of upstream’s is_submodule_modified() (which runs git status --porcelain=2 inside the submodule and classifies ? lines as untracked, everything else as modified).
submodule_dirt_checked
As submodule_dirt, but fail the way git does when the gitlink is populated yet broken — a .git file whose gitdir: pointer is gone (the submodule’s git directory was moved/deleted). git’s status / diff-index die with “fatal: not a git repository: …” in this case; an unpopulated gitlink (no .git at all) stays clean. Used on the status paths so git status and git describe --dirty surface the breakage (and --broken can tolerate it).
unresolve_index_paths
untracked_paths
untracked_paths_with_options
untracked_pathspec_matches
Whether path matches an ls-files pathspec (literal, directory prefix, or glob).
untracked_pathspec_needs_descent
Whether a directory walk must descend into parent to satisfy active pathspecs.
update_index_again
update_index_cacheinfo
update_index_index_info
update_index_ordered_paths_filtered
Stage an ordered list of paths, each carrying its own --chmod state, and (under verbose) print the add/remove/chmod action lines inline in command-line order. This is the entry point git update-index <path>... uses so that --chmod=+x A --chmod=-x B --verbose produces the interleaved add 'A' / chmod +x 'A' / add 'B' / chmod -x 'B' output git emits.
update_index_ordered_paths_filtered_with_index
update_index_paths
update_index_paths_filtered
Like update_index_paths, but applies the clean-side content filters (see apply_clean_filter) to file contents before they are hashed/written.
update_index_paths_filtered_with_index
update_index_paths_with_index
wildmatch
Match pattern against text with git’s wildmatch semantics. flags is a bitwise-OR of WM_CASEFOLD and WM_PATHNAME.
worktree_entry_state
Compare one expected tracked entry to the worktree path named by path.
worktree_entry_state_by_git_path
Compare one expected tracked entry to the worktree path named by a repository-relative git path (/ separators, raw bytes).
worktree_refs_in_use
worktree_root_for_git_dir
Resolve the working-tree root for a repository identified by its git directory, returning Ok(None) for a bare repository.
write_blob_body_or_symlink
Write the materialized worktree object at file_path as the right type for mode — git’s entry.c write_entry type-by-mode switch, factored into a single primitive so no checkout/reset/restore materializer can silently write a symlink blob as a regular file (the symlink-checkout bug class).
write_metadata_file_atomic
Write a git metadata file through a sibling .lock file and atomic rename.
write_repository_index
write_repository_index_ref
write_repository_index_ref_skip_hash
As write_repository_index_ref, but skip_hash writes a null trailing checksum (git’s index.skipHash / feature.manyFiles).
write_tree_from_index
write_tree_from_index_with_odb
write_tree_from_index_with_options