Skip to content

Commit 1dda48b

Browse files
committed
Merge branch 'gix-archive'
2 parents 9064ea3 + 44d9df4 commit 1dda48b

File tree

47 files changed

+2542
-85
lines changed

Some content is hidden

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

47 files changed

+2542
-85
lines changed

Diff for: Cargo.lock

+126
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+8-4
Original file line numberDiff line numberDiff line change
@@ -118,24 +118,27 @@ pretty-cli = [ "gitoxide-core/serde", "prodash/progress-tree", "prodash/progress
118118
prodash-render-line-crossterm = ["prodash-render-line", "prodash/render-line-crossterm", "prodash/signal-hook", "is-terminal", "crosstermion"]
119119

120120
## Progress reporting with a TUI, can then be enabled with the `--progress` flag.
121-
prodash-render-tui = ["prodash/render-tui", "prodash/render-tui-crossterm", "prodash/progress-tree", "futures-lite"]
121+
prodash-render-tui = ["prodash/render-tui", "prodash/render-tui-crossterm", "gix/progress-tree", "futures-lite"]
122122

123123
## Progress reporting by visually drawing lines into the terminal without switching to an alternate window.
124-
prodash-render-line = ["prodash/render-line", "prodash-render-line-crossterm", "prodash/progress-tree"]
124+
prodash-render-line = ["prodash/render-line", "prodash-render-line-crossterm", "gix/progress-tree"]
125125

126126
## Prints statistical information to inform about cache efficiency when those are dropped.
127127
## Use this as a way to understand if bigger caches actually produce greater yiedls.
128128
cache-efficiency-debug = ["gix-features/cache-efficiency-debug"]
129129

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

133133
## A program to perform analytics on a `git` repository, using an auto-maintained sqlite database
134134
gitoxide-core-tools-query = ["gitoxide-core/query"]
135135

136136
## A program to run algorithms on a corpus of repositories, recording each run for later comparison.
137137
gitoxide-core-tools-corpus = ["gitoxide-core/corpus"]
138138

139+
## A sub-command to generate archive from virtual worktree checkouts.
140+
gitoxide-core-tools-archive = ["gitoxide-core/archive"]
141+
139142
#! ### Building Blocks for mutually exclusive networking
140143
#! Blocking and async features are mutually exclusive and cause a compile-time error. This also means that `cargo … --all-features` will fail.
141144
#! Within each section, features can be combined.
@@ -199,7 +202,7 @@ overflow-checks = false
199202
# this bloats files but assures destructors are called, important for tempfiles. One day I hope we
200203
# can wire up the 'abrt' signal handler so tempfiles will be removed in case of panics.
201204
panic = 'unwind'
202-
codegen-units = 1
205+
#codegen-units = 1
203206
incremental = false
204207
build-override = { opt-level = 0 }
205208

@@ -265,6 +268,7 @@ members = [
265268
"gix-tui",
266269
"gix-tix",
267270
"gix-archive",
271+
"gix-worktree-stream",
268272
"gix-revwalk",
269273

270274
"cargo-smart-release",

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ is usable to some extent.
9191
* [gix-worktree](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-worktree)
9292
* [gix-bitmap](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-bitmap)
9393
* [gix-negotiate](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-negotiate)
94+
* [gix-worktree-stream](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-worktree-stream)
9495
* `gitoxide-core`
9596
* **very early** _(possibly without any documentation and many rough edges)_
9697
* [gix-date](https://github.com/Byron/gitoxide/blob/main/crate-status.md#gix-date)

Diff for: crate-status.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/gix-lock/README.
600600

601601
### gix
602602
* [x] utilities for applications to make long running operations interruptible gracefully and to support timeouts in servers.
603-
* [ ] handle `core.repositoryFormatVersion` and extensions
603+
* [x] handle `core.repositoryFormatVersion` and extensions
604604
* [x] support for unicode-precomposition of command-line arguments (needs explicit use in parent application)
605605
* **Repository**
606606
* [x] discovery
@@ -692,15 +692,16 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/gix-lock/README.
692692
* [ ] checkout with conversions like clean + smudge as in `.gitattributes`
693693
* [ ] _diff_ index with working tree
694694
* [ ] sparse checkout support
695-
* [ ] read per-worktree config if `extensions.worktreeConfig` is enabled.
695+
* [x] read per-worktree config if `extensions.worktreeConfig` is enabled.
696696
* **index**
697697
* [ ] tree from index
698-
* [ ] index from tree
698+
* [x] index from tree
699699
* **worktrees**
700700
* [x] open a repository with worktrees
701701
* [x] read locked state
702702
* [ ] obtain 'prunable' information
703703
* [x] proper handling of worktree related refs
704+
* [x] create a byte stream and create archives for such a stream, including worktree filters and conversions
704705
* [ ] create, move, remove, and repair
705706
* [x] access exclude information
706707
* [x] access attribute information
@@ -724,13 +725,23 @@ See its [README.md](https://github.com/Byron/gitoxide/blob/main/gix-lock/README.
724725
* [ ] API documentation
725726
* [ ] Some examples
726727

728+
### gix-worktree-stream
729+
730+
* [x] encode git-tree as stream of bytes (with large file support and actual streaming)
731+
* [x] produce a stream of entries
732+
* [x] add custom entries to the stream
733+
* [x] respect `export-ignore` git attribute
734+
* [x] apply standard worktree conversion to simulate an actual checkout
735+
* [ ] support for submodule inclusion
736+
* [x] API documentation
737+
* [ ] Some examples
738+
727739
### gix-archive
728740

729-
* [ ] `write_to()` for creating an archive with various container formats
730-
* [ ] add custom entries to the archive
731-
* [ ] handling of archive specific filters
732-
* [ ] filter files of tree (with access to attributes)
733-
* [ ] support for worktree conversion (via attributes and filters)
741+
* [x] `write_to()` for creating an archive with various container formats
742+
* [x] `tar` and `tar.gz`
743+
* [x] `zip`
744+
* [x] add prefix and modification date
734745
* [ ] API documentation
735746
* [ ] Some examples
736747

Diff for: deny.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ allow = [
4242
"MIT-0",
4343
"ISC",
4444
"Unicode-DFS-2016",
45-
"LicenseRef-ring"
45+
"LicenseRef-ring",
46+
"Zlib"
4647
]
4748
# Lint level for licenses considered copyleft
4849
copyleft = "allow"

Diff for: etc/check-package-size.sh

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ echo "in root: gitoxide CLI"
1818
(enter cargo-smart-release && indent cargo diet -n --package-size-limit 110KB)
1919
(enter gix-actor && indent cargo diet -n --package-size-limit 5KB)
2020
(enter gix-archive && indent cargo diet -n --package-size-limit 10KB)
21+
(enter gix-worktree-stream && indent cargo diet -n --package-size-limit 40KB)
2122
(enter gix-utils && indent cargo diet -n --package-size-limit 10KB)
2223
(enter gix-fs && indent cargo diet -n --package-size-limit 10KB)
2324
(enter gix-pathspec && indent cargo diet -n --package-size-limit 30KB)

Diff for: gitoxide-core/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ query = ["dep:rusqlite"]
2525
## *Note that* `organize` we need for finding git repositories fast.
2626
corpus = [ "dep:rusqlite", "dep:sysinfo", "organize", "dep:crossbeam-channel", "dep:serde_json", "dep:tracing-forest", "dep:tracing-subscriber", "dep:tracing", "dep:parking_lot" ]
2727

28+
## The ability to create archives from virtual worktrees, similar to `git archive`.
29+
archive = ["dep:gix-archive-for-configuration-only", "gix/worktree-archive"]
30+
2831
#! ### Mutually Exclusive Networking
2932
#! If both are set, _blocking-client_ will take precedence, allowing `--all-features` to be used.
3033

@@ -44,6 +47,7 @@ serde = ["gix/serde", "dep:serde_json", "dep:serde", "bytesize/serde"]
4447
gix = { version = "^0.49.1", path = "../gix", default-features = false }
4548
gix-pack-for-configuration-only = { package = "gix-pack", version = "^0.40.0", path = "../gix-pack", default-features = false, features = ["pack-cache-lru-dynamic", "pack-cache-lru-static"] }
4649
gix-transport-configuration-only = { package = "gix-transport", version = "^0.34.0", path = "../gix-transport", default-features = false }
50+
gix-archive-for-configuration-only = { package = "gix-archive", version = "^0.2.0", path = "../gix-archive", optional = true, features = ["tar", "tar_gz"] }
4751
serde = { version = "1.0.114", optional = true, default-features = false, features = ["derive"] }
4852
anyhow = "1.0.42"
4953
thiserror = "1.0.34"

0 commit comments

Comments
 (0)