Git import was importing parents and hidden files (including .git), in some cases

[?]
May 2, 2021, 8:45 PM
VU4KVXHWMLZCJJDO3DDUTNTYUDCDD7RSJ3QJ67EMNZV44H2YIKSAC

Dependencies

  • [2] 7RAQWUMU git import needs to record initial commit
  • [3] 5SLOJYHG Fixing the Git feature
  • [4] CVAT6LN3 Fixing git import, and adding more useful feedback (with `RUST_LOG="pijul=info"`)
  • [5] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [6] B3QWIGDE Fixing the Git features with the latest Pijul (+ conflicts in Cargo.toml)

Change contents

  • edit in pijul/src/commands/git.rs at line 543
    [4.153669]
    [4.153669]
    let mut has_parents = false;
  • edit in pijul/src/commands/git.rs at line 545
    [4.153710]
    [4.153710]
    has_parents = true;
  • edit in pijul/src/commands/git.rs at line 615
    [4.157148]
    [4.157148]
    }
    }
    }
    if !has_parents {
    for t in new_tree.iter() {
    if let Some(n) = t.name() {
    let n = Path::new(n).to_path_buf();
    prefixes.insert(n);
  • edit in pijul/src/commands/git.rs at line 627
    [4.157245][4.157245:157374](),[4.157374][2.0:148](),[2.148][4.157374:157384](),[4.157374][4.157374:157384]()
    debug!("done inspecting commit");
    if prefixes.contains(std::path::Path::new("")) {
    prefixes.clear();
    }
    // Root has no parents so record everything
    if prefixes.is_empty() {
    prefixes.insert(repo.repo.path.clone());
    }
  • edit in pijul/src/commands/git.rs at line 643
    [3.3452]
    [3.3452]
    debug!("prefixes = {:?}", prefixes);