History

Fix typos

Kian-Meng Ang committed 4 years ago

Commit e9fcb701 parent aa639d858 files · +73 −73Browse files

Showing the changes to git-pack/src/data (6 of 58 files). Show all

Unified · Split

6 files
  1. git-pack/src/data/file/decode_entry.rs +3 −3
  2. git-pack/src/data/input/entries_to_bytes.rs +2 −2
  3. git-pack/src/data/output/bytes.rs +1 −1
  4. git-pack/src/data/output/count/mod.rs +1 −1
  5. git-pack/src/data/output/count/objects/types.rs +1 −1
  6. git-pack/src/data/output/entry/iter_from_counts.rs +1 −1
git-pack/src/data/file/decode_entry.rs+3−3
@@ -135,7 +135,7 @@ impl File { · 134 unmodified lines
135 /// a base object, instead of an in-pack offset.135 /// a base object, instead of an in-pack offset.
136 ///136 ///
137 /// `delta_cache` is a mechanism to avoid looking up base objects multiple times when decompressing multiple objects in a row.137 /// `delta_cache` is a mechanism to avoid looking up base objects multiple times when decompressing multiple objects in a row.
138 /// Use a [Noop-Cache][cache::Never] to disable caching alltogether at the cost of repeating work.138 /// Use a [Noop-Cache][cache::Never] to disable caching all together at the cost of repeating work.
139 pub fn decode_entry(139 pub fn decode_entry(
140 &self,140 &self,
141 entry: crate::data::Entry,141 entry: crate::data::Entry,
@@ -165,7 +165,7 @@ impl File { · 23 unmodified lines
165 }165 }
166 }166 }
167 167
168 /// resolve: technically, this shoudln't ever be required as stored local packs don't refer to objects by id168 /// resolve: technically, this shouldn't ever be required as stored local packs don't refer to objects by id
169 /// that are outside of the pack. Unless, of course, the ref refers to an object within this pack, which means169 /// that are outside of the pack. Unless, of course, the ref refers to an object within this pack, which means
170 /// it's very, very large as 20bytes are smaller than the corresponding MSB encoded number170 /// it's very, very large as 20bytes are smaller than the corresponding MSB encoded number
171 fn resolve_deltas(171 fn resolve_deltas(
@@ -298,7 +298,7 @@ impl File { · 126 unmodified lines
298 let end = first_buffer_size + second_buffer_size;298 let end = first_buffer_size + second_buffer_size;
299 if delta_range.start < end {299 if delta_range.start < end {
300 // …this means that the delta size is even larger than two uncompressed worst-case300 // …this means that the delta size is even larger than two uncompressed worst-case
301 // intermediate results combined. It would already be undesireable to have it bigger301 // intermediate results combined. It would already be undesirable to have it bigger
302 // then the target size (as you could just store the object in whole).302 // then the target size (as you could just store the object in whole).
303 // However, this just means that it reuses existing deltas smartly, which as we rightfully303 // However, this just means that it reuses existing deltas smartly, which as we rightfully
304 // remember stand for an object each. However, this means a lot of data is read to restore304 // remember stand for an object each. However, this means a lot of data is read to restore
git-pack/src/data/input/entries_to_bytes.rs+2−2
@@ -21,7 +21,7 @@ pub struct EntriesToBytesIter<I: Iterator, W> { · 20 unmodified lines
21 data_version: crate::data::Version,21 data_version: crate::data::Version,
22 /// The amount of entries seen so far22 /// The amount of entries seen so far
23 num_entries: u32,23 num_entries: u32,
24 /// If we are done, no additional writes will occour24 /// If we are done, no additional writes will occur
25 is_done: bool,25 is_done: bool,
26 /// The kind of hash to use for the digest26 /// The kind of hash to use for the digest
27 object_hash: git_hash::Kind,27 object_hash: git_hash::Kind,
@@ -33,7 +33,7 @@ where · 5 unmodified lines
33 W: std::io::Read + std::io::Write + std::io::Seek,33 W: std::io::Read + std::io::Write + std::io::Seek,
34{34{
35 /// Create a new instance reading [entries][input::Entry] from an `input` iterator and write pack data bytes to35 /// Create a new instance reading [entries][input::Entry] from an `input` iterator and write pack data bytes to
36 /// `output` writer, resembling a pack of `version`. The amonut of entries will be dynaimcally determined and36 /// `output` writer, resembling a pack of `version`. The amount of entries will be dynaimcally determined and
37 /// the pack is completed once the last entry was written.37 /// the pack is completed once the last entry was written.
38 /// `object_hash` is the kind of hash to use for the pack checksum and maybe other places, depending on the version.38 /// `object_hash` is the kind of hash to use for the pack checksum and maybe other places, depending on the version.
39 ///39 ///
git-pack/src/data/output/bytes.rs+1−1
@@ -37,7 +37,7 @@ pub struct FromEntriesIter<I, W> { · 36 unmodified lines
37 /// It stores the pack offsets at which objects begin.37 /// It stores the pack offsets at which objects begin.
38 /// Additionally we store if an object was invalid, and if so we will not write it nor will we allow delta objects to it.38 /// Additionally we store if an object was invalid, and if so we will not write it nor will we allow delta objects to it.
39 pack_offsets_and_validity: Vec<(u64, bool)>,39 pack_offsets_and_validity: Vec<(u64, bool)>,
40 /// If we are done, no additional writes will occour40 /// If we are done, no additional writes will occur
41 is_done: bool,41 is_done: bool,
42}42}
43 43
git-pack/src/data/output/count/mod.rs+1−1
@@ -8,7 +8,7 @@ use crate::data::output::Count; · 7 unmodified lines
8pub enum PackLocation {8pub enum PackLocation {
9 /// We did not lookup this object9 /// We did not lookup this object
10 NotLookedUp,10 NotLookedUp,
11 /// The object was looked up and there may be a location in a pack, along with enty information11 /// The object was looked up and there may be a location in a pack, along with entry information
12 LookedUp(Option<crate::data::entry::Location>),12 LookedUp(Option<crate::data::entry::Location>),
13}13}
14 14
git-pack/src/data/output/count/objects/types.rs+1−1
@@ -58,7 +58,7 @@ impl Default for ObjectExpansion { · 57 unmodified lines
58 }58 }
59}59}
60 60
61/// Configuration options for the pack generation functions provied in [this module][crate::data::output].61/// Configuration options for the pack generation functions provided in [this module][crate::data::output].
62#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]62#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
63#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]63#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
64pub struct Options {64pub struct Options {
git-pack/src/data/output/entry/iter_from_counts.rs+1−1
@@ -351,7 +351,7 @@ mod types { · 350 unmodified lines
351 PackCopyAndBaseObjects,351 PackCopyAndBaseObjects,
352 }352 }
353 353
354 /// Configuration options for the pack generation functions provied in [this module][crate::data::output].354 /// Configuration options for the pack generation functions provided in [this module][crate::data::output].
355 #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]355 #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
356 #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]356 #[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
357 pub struct Options {357 pub struct Options {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t