tree save&load

This commit is contained in:
HouXiaoxuan
2023-12-21 01:39:45 +08:00
parent 94c2cadf72
commit 9feddad8ef
3 changed files with 129 additions and 11 deletions

View File

@@ -21,7 +21,7 @@ pub struct Commit {
impl Commit {
pub fn new(index: &Index, parent: Vec<Hash>, message: String) -> Commit {
let tree = Tree::new(index);
let mut tree = Tree::new(index);
let tree_hash = tree.save();
Commit {
hash: "".to_string(),