Commit e651ac3f authored by Ivanq's avatar Ivanq

Git: Fix changing trees in makeTreeDelta()

parent 31b22810
...@@ -809,7 +809,7 @@ class Git { ...@@ -809,7 +809,7 @@ class Git {
if(treeItemIndex == -1) { if(treeItemIndex == -1) {
// Add tree // Add tree
base.push(change); base.push(change);
} else if(tree[treeItemIndex].type != "tree") { } else if(base[treeItemIndex].type != "tree") {
// Change type to tree // Change type to tree
base[treeItemIndex] = change; base[treeItemIndex] = change;
} else { } else {
...@@ -819,6 +819,9 @@ class Git { ...@@ -819,6 +819,9 @@ class Git {
return this.readUnknownObject(id) return this.readUnknownObject(id)
.then(subTree => { .then(subTree => {
return this.makeTreeDelta(subTree.content, change.content); return this.makeTreeDelta(subTree.content, change.content);
})
.then(delta => {
base[treeItemIndex].content = delta;
}); });
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment