When importing initial Git commits, use walk rather than iter to walk the tree
Dependencies
- [2]
AAXP2534Tags: completing the subcommand - [3]
VU4KVXHWGit import was importing parents and hidden files (including .git), in some cases - [4]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [5]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [6]
CVAT6LN3Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`)
Change contents
- replacement in pijul/src/commands/git.rs at line 604[3.139]→[3.139:178](∅→∅),[3.178]→[2.1615:1661](∅→∅),[2.1661]→[3.178:318](∅→∅),[3.178]→[3.178:318](∅→∅),[3.318]→[3.157148:157180](∅→∅),[3.157148]→[3.157148:157180](∅→∅)
for t in new_tree.iter() {debug!("t = {:?}", t.name());if let Some(n) = t.name() {let n = Path::new(n).to_path_buf();prefixes.insert(n);}}use git2::{TreeWalkMode, TreeWalkResult};new_tree.walk(TreeWalkMode::PreOrder, |x, t| {debug!("t = {:?} {:?}", x, t.name());if let Some(n) = t.name() {let mut m = Path::new(x).to_path_buf();m.push(n);prefixes.insert(m);}TreeWalkResult::Ok}).unwrap();