This reverts commit 8373671fd4f3f7e9d78c480e9f68c0a7ae423c69. Actually that's not correct - diffs can send only changed objects. Diffing is the right tool for that.
Showing the changes to gitoxide-core/src (1 of 5 files). Show all
Unified · Split
| @@ -12,11 +12,12 @@ pub const PROGRESS_RANGE: std::ops::RangeInclusive<u8> = 1..=2; · 11 unmodified lines | |||
| 12 | pub enum ObjectExpansion { | 12 | pub enum ObjectExpansion { |
| 13 | None, | 13 | None, |
| 14 | TreeTraversal, | 14 | TreeTraversal, |
| 15 | TreeDiff, | ||
| 15 | } | 16 | } |
| 16 | 17 | ||
| 17 | impl ObjectExpansion { | 18 | impl 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 | } |