History

Revert "[pack-gen] remove tree-diff as traversal option."

This reverts commit 8373671fd4f3f7e9d78c480e9f68c0a7ae423c69. Actually that's not correct - diffs can send only changed objects. Diffing is the right tool for that.

Sebastian Thiel committed 5 years ago

Commit 2907a5f1 parent 83736715 files · +177 −18Browse files

Showing the changes to gitoxide-core/src (1 of 5 files). Show all

Unified · Split

gitoxide-core/src/pack/create.rs+4−1
@@ -12,11 +12,12 @@ pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=2; · 11 unmodified lines
12pub enum ObjectExpansion {12pub enum ObjectExpansion {
13 None,13 None,
14 TreeTraversal,14 TreeTraversal,
15 TreeDiff,
15}16}
16 17
17impl ObjectExpansion {18impl ObjectExpansion {
18 pub fn variants() -> &'static [&'static str] {19 pub fn variants() -> &'static [&'static str] {
19 &["none", "tree-traversal"]20 &["none", "tree-traversal", "tree-diff"]
20 }21 }
21}22}
22 23
@@ -35,6 +36,7 @@ impl FromStr for ObjectExpansion { · 12 unmodified lines
35 Ok(match slc.as_str() {36 Ok(match slc.as_str() {
36 "none" => None,37 "none" => None,
37 "tree-traversal" => TreeTraversal,38 "tree-traversal" => TreeTraversal,
39 "tree-diff" => TreeDiff,
38 _ => return Err("invalid value".into()),40 _ => return Err("invalid value".into()),
39 })41 })
40 }42 }
@@ -46,6 +48,7 @@ impl From<ObjectExpansion> for pack::data::output::count_objects::ObjectExpansio · 5 unmodified lines
46 match v {48 match v {
47 ObjectExpansion::None => AsIs,49 ObjectExpansion::None => AsIs,
48 ObjectExpansion::TreeTraversal => TreeContents,50 ObjectExpansion::TreeTraversal => TreeContents,
51 ObjectExpansion::TreeDiff => TreeAdditionsComparedToAncestor,
49 }52 }
50 }53 }
51}54}

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