Skip to content

Commit c4e8745

Browse files
committed
doc: inform about tree to index "status"
1 parent 3b8c971 commit c4e8745

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

gix-status/src/lib.rs

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,23 @@
22
//! of the repository state, like comparisons between…
33
//!
44
//! * index and working tree
5-
//! * index and tree
6-
//! * find untracked files
5+
//! * *tree and index*
76
//!
8-
//! While also being able to check check if the working tree is dirty, quickly.
7+
//! …while also being able to check if the working tree is dirty, quickly, by instructing the operation to stop once the first
8+
//! change was found.
9+
//!
10+
//! ### Tree-Index Status
11+
//!
12+
//! This status is not actually implemented here as it's not implemented directly. Instead, one creates an Index from a tree
13+
//! and then diffs two indices with `gix_diff::index(index_from_tree, usually_dot_git_index)`. This adds about 15% to the runtime
14+
//! and comes at the cost of another index in memory.
15+
//! Once there are generators implementing depth-first tree iteration should become trivial, but for now it's very hard if one
16+
//! wants to return referenced state of the iterator (which is not possible).
17+
//!
18+
//! ### Difference to `gix-diff`
19+
//!
20+
//! Technically, `status` is just another form of diff between different kind of sides, i.e. an index and a working tree.
21+
//! This is the difference to `gix-diff`, which compares only similar items.
922
//!
1023
//! ### Feature Flags
1124
#![cfg_attr(

0 commit comments

Comments
 (0)