@@ -184,6 +184,53 @@ pub mod pack {
184184 /// Otherwise the expansion mode is 'tree-traversal' by default.
185185 tips : Vec < OsString > ,
186186 } ,
187+ #[ cfg( feature = "gitoxide-core-tools-delta-create" ) ]
188+ /// Create a new pack with customized delta topological relationships. NOTE: This is an experimental feature and may change in the future.
189+ DeltaCreate {
190+ #[ clap( long, short = 'r' ) ]
191+ /// the directory containing the '.git' repository from which objects should be read.
192+ repository : Option < PathBuf > ,
193+
194+ #[ clap( long, default_value_t = 3 , requires = "nondeterministic_count" ) ]
195+ /// The amount of threads to use when counting and the `--nondeterminisitc-count` flag is set, defaulting
196+ /// to the globally configured threads.
197+ ///
198+ /// Use it to have different trade-offs between counting performance and cost in terms of CPU, as the scaling
199+ /// here is everything but linear. The effectiveness of each core seems to be no more than 30%.
200+ counting_threads : usize ,
201+
202+ #[ clap( long) ]
203+ /// if set, the counting phase may be accelerated using multithreading.
204+ ///
205+ /// On the flip side, however, one will loose deterministic counting results which affects the
206+ /// way the resulting pack is structured.
207+ nondeterministic_count : bool ,
208+
209+ #[ clap( long, short = 's' ) ]
210+ /// If set statistical information will be presented to inform about pack creation details.
211+ /// It's a form of instrumentation for developers to help improve pack generation.
212+ statistics : bool ,
213+
214+ #[ clap( long) ]
215+ /// The size in megabytes for a cache to speed up pack access for packs with long delta chains.
216+ /// It is shared among all threads, so 4 threads would use their own cache 1/4th of the size.
217+ ///
218+ /// If unset, no cache will be used.
219+ pack_cache_size_mb : Option < usize > ,
220+
221+ #[ clap( long) ]
222+ /// The size in megabytes for a cache to speed up accessing entire objects, bypassing object database access when hit.
223+ /// It is shared among all threads, so 4 threads would use their own cache 1/4th of the size.
224+ ///
225+ /// This cache type is currently only effective when using the 'diff-tree' object expansion.
226+ ///
227+ /// If unset, no cache will be used.
228+ object_cache_size_mb : Option < usize > ,
229+
230+ /// The directory into which to write the pack file.
231+ #[ clap( long, short = 'o' ) ]
232+ output_directory : Option < PathBuf > ,
233+ } ,
187234 /// Use the gix-protocol to receive a pack, emulating a clone.
188235 #[ cfg( any( feature = "gitoxide-core-async-client" , feature = "gitoxide-core-blocking-client" ) ) ]
189236 Receive {
0 commit comments