fast-import: allow moving the root tree
commit62bfa11cc9a8cb0aacbba0aed503e85cdc6ba0a4
authorJohn Keeping <john@keeping.me.uk>
Sun, 23 Jun 2013 14:58:22 +0000 (23 15:58 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 23 Jun 2013 21:22:28 +0000 (23 14:22 -0700)
tree0ebbf94776708bf731ba2fac78260f160cf5188c
parente0eb6b9720db743993d9374e366cb6b7664f0a6d
fast-import: allow moving the root tree

Because fast-import.c::tree_content_remove does not check for the empty
path, it is not possible to move the root tree to a subdirectory.
Instead the error "Path  not in branch" is produced (note the double
space where the empty path has been inserted).

Fix this by explicitly checking for the empty path and handling it.

Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c
t/t9300-fast-import.sh