summaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2013-06-23 14:58:22 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-23 21:22:28 (GMT)
commit62bfa11cc9a8cb0aacbba0aed503e85cdc6ba0a4 (patch)
tree0ebbf94776708bf731ba2fac78260f160cf5188c /t/t9300-fast-import.sh
parente0eb6b9720db743993d9374e366cb6b7664f0a6d (diff)
downloadgit-62bfa11cc9a8cb0aacbba0aed503e85cdc6ba0a4.zip
git-62bfa11cc9a8cb0aacbba0aed503e85cdc6ba0a4.tar.gz
git-62bfa11cc9a8cb0aacbba0aed503e85cdc6ba0a4.tar.bz2
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>
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-xt/t9300-fast-import.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 04385a7..31a770d 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1050,7 +1050,7 @@ cat >expect <<EOF
:100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 R100 newdir/exec.sh sub/newdir/exec.sh
:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100 newdir/interesting sub/newdir/interesting
EOF
-test_expect_failure \
+test_expect_success \
'M: rename root to subdirectory' \
'git fast-import <input &&
git diff-tree -M -r M4^ M4 >actual &&