History

change!: consistently use `object_hash` instead of `hash_kind` (#279)

Sebastian Thiel committed 4 years ago

Commit de4fa641 parent 81bd4533 files · +5 −5Browse files

Unified · Split

3 files
  1. gitoxide-core/src/pack/explode.rs +3 −3
  2. gitoxide-core/src/pack/index.rs +1 −1
  3. gitoxide-core/src/pack/receive.rs +1 −1
gitoxide-core/src/pack/explode.rs+3−3
@@ -130,10 +130,10 @@ impl git_repository::odb::Write for OutputWriter { · 129 unmodified lines
130}130}
131 131
132impl OutputWriter {132impl OutputWriter {
133 fn new(path: Option<impl AsRef<Path>>, compress: bool, hash_kind: git_repository::hash::Kind) -> Self {133 fn new(path: Option<impl AsRef<Path>>, compress: bool, object_hash: git_repository::hash::Kind) -> Self {
134 match path {134 match path {
135 Some(path) => OutputWriter::Loose(loose::Store::at(path.as_ref(), hash_kind)),135 Some(path) => OutputWriter::Loose(loose::Store::at(path.as_ref(), object_hash)),
136 None => OutputWriter::Sink(odb::sink(hash_kind).compress(compress)),136 None => OutputWriter::Sink(odb::sink(object_hash).compress(compress)),
137 }137 }
138 }138 }
139}139}
gitoxide-core/src/pack/index.rs+1−1
@@ -85,7 +85,7 @@ pub fn from_pack( · 84 unmodified lines
85 thread_limit: ctx.thread_limit,85 thread_limit: ctx.thread_limit,
86 iteration_mode: ctx.iteration_mode.into(),86 iteration_mode: ctx.iteration_mode.into(),
87 index_kind: pack::index::Version::default(),87 index_kind: pack::index::Version::default(),
88 hash_kind: git_repository::hash::Kind::Sha1, // TODO: make this configurable via CLI, context88 object_hash: git_repository::hash::Kind::Sha1, // TODO: make this configurable via CLI, context
89 };89 };
90 let out = ctx.out;90 let out = ctx.out;
91 let format = ctx.format;91 let format = ctx.format;
gitoxide-core/src/pack/receive.rs+1−1
@@ -330,7 +330,7 @@ fn receive_pack_blocking<W: io::Write>( · 329 unmodified lines
330 thread_limit: ctx.thread_limit,330 thread_limit: ctx.thread_limit,
331 index_kind: pack::index::Version::V2,331 index_kind: pack::index::Version::V2,
332 iteration_mode: pack::data::input::Mode::Verify,332 iteration_mode: pack::data::input::Mode::Verify,
333 hash_kind: git_repository::hash::Kind::Sha1, // TODO: make this configurable, but respect the server response as well.333 object_hash: git_repository::hash::Kind::Sha1, // TODO: make this configurable, but respect the server response as well.
334 };334 };
335 let outcome =335 let outcome =
336 pack::Bundle::write_to_directory(input, directory.take(), progress, &ctx.should_interrupt, None, options)336 pack::Bundle::write_to_directory(input, directory.take(), progress, &ctx.should_interrupt, None, options)