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
1212 pub enum ObjectExpansion {
1313 None,
1414 TreeTraversal,
15+ TreeDiff,
1516 }
1617
1718 impl ObjectExpansion {
1819 pub fn variants() -> &'static [&'static str] {
19− &["none", "tree-traversal"]
20+ &["none", "tree-traversal", "tree-diff"]
2021 }
2122 }
2223
@@ -35,6 +36,7 @@ impl FromStr for ObjectExpansion { · 12 unmodified lines
3536 Ok(match slc.as_str() {
3637 "none" => None,
3738 "tree-traversal" => TreeTraversal,
39+ "tree-diff" => TreeDiff,
3840 _ => return Err("invalid value".into()),
3941 })
4042 }
@@ -46,6 +48,7 @@ impl From<ObjectExpansion> for pack::data::output::count_objects::ObjectExpansio · 5 unmodified lines
4648 match v {
4749 ObjectExpansion::None => AsIs,
4850 ObjectExpansion::TreeTraversal => TreeContents,
51+ ObjectExpansion::TreeDiff => TreeAdditionsComparedToAncestor,
4952 }
5053 }
5154 }

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