fix tree graft-in bug

When adding a tree like a/b/c/d when a/b already exists, fixes the bug that
the tree that got created was a/b/a/b/c/d

Just need to flatten out the top N directories of the tree that's being
grafted in, so we get the c/d part. This was complicated by the Tree
data type being a rose tree rather than a regular tree.

This commit was sponsored by Nick Daly on Patreon.
This commit is contained in:
Joey Hess 2016-10-11 15:36:40 -04:00
parent 66ebf1a8f9
commit 3f25317ad5
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 23 additions and 11 deletions

View file

@ -86,3 +86,5 @@ the adjusted branch that adds the file back, but the file doesn't reach
the master branch in this scenario.
--[[Joey]]
Both bugs fixed now. [[done]] --[[Joey]]