fix tree graft-in bug
authorJoey Hess <joeyh@joeyh.name>
Tue, 11 Oct 2016 19:36:40 +0000 (15:36 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 11 Oct 2016 19:36:40 +0000 (15:36 -0400)
commit3f25317ad587fc06cb1c16dc255e8035ab1ef91d
tree26794f6423707c898f9aab8f44532a8491c64e38
parent66ebf1a8f98a5791455aa877b79f54258e92b3d3
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.
Git/Tree.hs
doc/bugs/sync_in_adjusted_branch_deleted_recently_added_files.mdwn