History

[pack-gen] And it shows we really need to let the traversal be done first

Needs refactoring and there we go with needing the 'counting' objects phase.

Sebastian Thiel committed 5 years ago

Commit a870eb21 parent 27c9bc11 file · +3 −2Browse files

Unified · Split

gitoxide-core/src/pack/create.rs+3−2
@@ -63,7 +63,7 @@ pub fn create( · 62 unmodified lines
63 repository: impl AsRef<Path>,63 repository: impl AsRef<Path>,
64 tips: impl IntoIterator<Item = impl AsRef<OsStr>>,64 tips: impl IntoIterator<Item = impl AsRef<OsStr>>,
65 input: Option<impl io::BufRead + Send + 'static>,65 input: Option<impl io::BufRead + Send + 'static>,
66 out: impl io::Write,66 _out: impl io::Write,
67 ctx: Context,67 ctx: Context,
68) -> anyhow::Result<()> {68) -> anyhow::Result<()> {
69 let db = Arc::new(find_db(repository)?);69 let db = Arc::new(find_db(repository)?);
@@ -87,7 +87,7 @@ pub fn create( · 17 unmodified lines
87 .and_then(|hex_id| git_hash::ObjectId::from_hex(hex_id.as_bytes()).ok())87 .and_then(|hex_id| git_hash::ObjectId::from_hex(hex_id.as_bytes()).ok())
88 })),88 })),
89 };89 };
90 let entries = pack::data::output::objects_to_entries_iter(90 let _entries = pack::data::output::objects_to_entries_iter(
91 Arc::clone(&db),91 Arc::clone(&db),
92 || pack::cache::lru::StaticLinkedList::<64>::default(),92 || pack::cache::lru::StaticLinkedList::<64>::default(),
93 input,93 input,
@@ -99,6 +99,7 @@ pub fn create( · 5 unmodified lines
99 input_object_expansion: ctx.expansion.into(),99 input_object_expansion: ctx.expansion.into(),
100 },100 },
101 );101 );
102 // pack::data::output::EntriesToBytesIter::new()
102 todo!("impl")103 todo!("impl")
103}104}
104 105