Skip to content

Commit face359

Browse files
committed
Merge branch 'dirwalk'
2 parents 53e9b4e + a3ab5bc commit face359

File tree

61 files changed

+6382
-496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+6382
-496
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@ target/
66

77
# repositories used for local testing
88
/tests/fixtures/repos
9+
$/tests/fixtures/repos/
10+
911
/tests/fixtures/commit-graphs/
12+
$/tests/fixtures/commit-graphs/
1013

1114
**/generated-do-not-edit/
1215

1316
# Cargo lock files of fuzz targets - let's have the latest versions of everything under test
1417
**/fuzz/Cargo.lock
18+
19+
# newer Git sees these as precious, older Git falls through to the pattern above
20+
$**/fuzz/Cargo.lock

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ prodash-render-line = ["prodash/render-line", "prodash-render-line-crossterm", "
129129
cache-efficiency-debug = ["gix-features/cache-efficiency-debug"]
130130

131131
## A way to enable most `gitoxide-core` tools found in `ein tools`, namely `organize` and `estimate hours`.
132-
gitoxide-core-tools = ["gitoxide-core/organize", "gitoxide-core/estimate-hours", "gitoxide-core-tools-archive"]
132+
gitoxide-core-tools = ["gitoxide-core/organize", "gitoxide-core/estimate-hours", "gitoxide-core-tools-archive", "gitoxide-core-tools-clean"]
133133

134134
## A program to perform analytics on a `git` repository, using an auto-maintained sqlite database
135135
gitoxide-core-tools-query = ["gitoxide-core/query"]
@@ -140,6 +140,9 @@ gitoxide-core-tools-corpus = ["gitoxide-core/corpus"]
140140
## A sub-command to generate archive from virtual worktree checkouts.
141141
gitoxide-core-tools-archive = ["gitoxide-core/archive"]
142142

143+
## A sub-command to clean the worktree from untracked and ignored files.
144+
gitoxide-core-tools-clean = ["gitoxide-core/clean"]
145+
143146
#! ### Building Blocks for mutually exclusive networking
144147
#! Blocking and async features are mutually exclusive and cause a compile-time error. This also means that `cargo … --all-features` will fail.
145148
#! Within each section, features can be combined.

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: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -612,12 +612,12 @@ 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+
* [ ] multi-threaded initialization of icase hash table is always used to accelerate index lookups, even if ignoreCase = false for performance
620+
* [ ] special handling of submodules (for now, submodules or nested repositories are detected, but they can't be walked into naturally)
621621
* [ ] accelerated walk with `untracked`-cache (as provided by `UNTR` extension of `gix_index::File`)
622622

623623
### gix-index
@@ -628,6 +628,7 @@ The git staging area.
628628
* [x] V2 - the default, including long-paths support
629629
* [x] V3 - extended flags
630630
* [x] V4 - delta-compression for paths
631+
* [ ] TODO(perf): multi-threaded implementation should boost performance, spends most time in storing paths, has barely any benefit right now.
631632
* optional threading
632633
* [x] concurrent loading of index extensions
633634
* [x] threaded entry reading
@@ -658,7 +659,9 @@ The git staging area.
658659
* `stat` update
659660
* [ ] optional threaded `stat` based on thread_cost (aka preload)
660661
* [x] handling of `.gitignore` and system file exclude configuration
661-
* [ ] handle potential races
662+
* [x] lookups that ignore the case
663+
* [ ] multi-threaded lookup table generation with the same algorithm as the one used by Git
664+
* [ ] expand sparse folders (don't know how this relates to traversals right now)
662665
* maintain extensions when altering the cache
663666
* [ ] TREE for speeding up tree generation
664667
* [ ] REUC resolving undo

gitoxide-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ corpus = [ "dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "
2828
## The ability to create archives from virtual worktrees, similar to `git archive`.
2929
archive = ["dep:gix-archive-for-configuration-only", "gix/worktree-archive"]
3030

31+
## The ability to clean a repository, similar to `git clean`.
32+
clean = [ "gix/dirwalk" ]
33+
3134
#! ### Mutually Exclusive Networking
3235
#! If both are set, _blocking-client_ will take precedence, allowing `--all-features` to be used.
3336

gitoxide-core/src/index/information.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ mod serde_only {
101101
if f.fs_monitor().is_some() {
102102
names.push("fs-monitor (FSMN)");
103103
};
104+
if f.had_offset_table() {
105+
names.push("offset-table (IEOT)")
106+
}
107+
if f.had_end_of_index_marker() {
108+
names.push("end-of-index (EOIE)")
109+
}
104110
Extensions { names, tree }
105111
},
106112
entries: {

0 commit comments

Comments
 (0)