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 | 12 | pub enum ObjectExpansion { |
| 13 | 13 | None, |
| 14 | 14 | TreeTraversal, |
| 15 | + TreeDiff, | |
| 15 | 16 | } |
| 16 | 17 | |
| 17 | 18 | impl ObjectExpansion { |
| 18 | 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 | 36 | Ok(match slc.as_str() { |
| 36 | 37 | "none" => None, |
| 37 | 38 | "tree-traversal" => TreeTraversal, |
| 39 | + "tree-diff" => TreeDiff, | |
| 38 | 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 | 48 | match v { |
| 47 | 49 | ObjectExpansion::None => AsIs, |
| 48 | 50 | ObjectExpansion::TreeTraversal => TreeContents, |
| 51 | + ObjectExpansion::TreeDiff => TreeAdditionsComparedToAncestor, | |
| 49 | 52 | } |
| 50 | 53 | } |
| 51 | 54 | } |