Skip to content

Commit 5ffa230

Browse files
committed
Implementation of the Git-style directory walk.
1 parent 57c4884 commit 5ffa230

File tree

17 files changed

+3838
-36
lines changed

17 files changed

+3838
-36
lines changed

Cargo.lock

Lines changed: 44 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DEVELOPMENT.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,5 @@ GIT_SSH_COMMAND="ssh -VVV" \
309309
git <command>
310310
```
311311

312+
Consider adding `GIT_TRACE2_PERF=1` (possibly add `GIT_TRACE2_PERF_BRIEF=1` for brevity) as well for statistics and variables
313+
(see [their source for more](https://github.com/git/git/blob/b50a608ba20348cb3dfc16a696816d51780e3f0f/trace2/tr2_sysenv.c#L50).

crate-status.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,11 @@ A plumbing crate with shared functionality regarding EWAH compressed bitmaps, as
612612

613613
A git directory walk.
614614

615-
* [ ] list untracked files
616-
- [ ] `normal` - files and directories
617-
- [ ] `all` - expand to untracked files in untracked directories
618-
* [ ] list ignored files
619-
- [ ] `matching` mode (show every ignored file, do not aggregate into parent directory)
620-
- [ ] `traditional` mode (aggregate all ignored files of a folder into ignoring the folder itself)
615+
* [x] list untracked files
616+
* [x] list ignored files
617+
* [x] collapsing of untracked and ignored directories
618+
* [x] pathspec based filtering
619+
* [ ] special handling of submodules (for now, submodules or nested repositories are detected, but they can't be walked into naturally)
621620
* [ ] accelerated walk with `untracked`-cache (as provided by `UNTR` extension of `gix_index::File`)
622621

623622
### gix-index

gix-dir/Cargo.toml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gix-dir"
3-
version = "0.0.0"
3+
version = "0.1.0"
44
repository = "https://github.com/Byron/gitoxide"
55
license = "MIT OR Apache-2.0"
66
description = "A crate of the gitoxide project dealing with directory walks"
@@ -12,3 +12,21 @@ rust-version = "1.65"
1212
doctest = false
1313

1414
[dependencies]
15+
gix-trace = { version = "^0.1.7", path = "../gix-trace" }
16+
gix-index = { version = "^0.30.0", path = "../gix-index" }
17+
gix-discover = { version = "^0.30.0", path = "../gix-discover" }
18+
gix-fs = { version = "^0.10.0", path = "../gix-fs" }
19+
gix-path = { version = "^0.10.4", path = "../gix-path" }
20+
gix-pathspec = { version = "^0.6.0", path = "../gix-pathspec" }
21+
gix-worktree = { version = "^0.31.0", path = "../gix-worktree", default-features = false }
22+
gix-object = { version = "^0.41.0", path = "../gix-object" }
23+
gix-ignore = { version = "^0.11.0", path = "../gix-ignore" }
24+
gix-utils = { version = "^0.1.9", path = "../gix-utils", features = ["bstr"] }
25+
26+
bstr = { version = "1.5.0", default-features = false }
27+
thiserror = "1.0.56"
28+
29+
[dev-dependencies]
30+
gix-testtools = { path = "../tests/tools" }
31+
gix-fs = { path = "../gix-fs" }
32+
pretty_assertions = "1.4.0"

0 commit comments

Comments
 (0)