aboutsummaryrefslogtreecommitdiff
path: root/t/t9300-fast-import.sh
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2013-06-23 15:58:21 +0100
committerJunio C Hamano <gitster@pobox.com>2013-06-23 14:22:28 -0700
commite0eb6b9720db743993d9374e366cb6b7664f0a6d (patch)
treeb36a886fcfd79457d61202e5f4f86d92634ca667 /t/t9300-fast-import.sh
parentadefdba536623e23af5d808eea9ec3eba5c55dd6 (diff)
downloadgit-e0eb6b9720db743993d9374e366cb6b7664f0a6d.tar.gz
git-e0eb6b9720db743993d9374e366cb6b7664f0a6d.tar.xz
fast-import: allow ls or filecopy of the root tree
Commit 178e1de (fast-import: don't allow 'ls' of path with empty components, 2012-03-09) restricted paths which: . contain an empty directory component (e.g. foo//bar is invalid), . end with a directory separator (e.g. foo/ is invalid), . start with a directory separator (e.g. /foo is invalid). However, the implementation also caught the empty path, which should represent the root tree. Relax this restriction so that the empty path is explicitly allowed and refers to the root tree. Reported-by: Dave Abrahams <dave@boostpro.com> 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.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index f4b93557a..04385a725 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -1253,7 +1253,7 @@ test_expect_success \
git diff-tree -C --find-copies-harder -r N4 N6 >actual &&
compare_diff_raw expect actual'
-test_expect_failure \
+test_expect_success \
'N: copy root by path' \
'cat >expect <<-\EOF &&
:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf oldroot/file2/newf
@@ -2988,7 +2988,7 @@ test_expect_success 'S: ls with garbage after sha1 must fail' '
###
# Setup is carried over from series S.
-test_expect_failure 'T: ls root tree' '
+test_expect_success 'T: ls root tree' '
sed -e "s/Z\$//" >expect <<-EOF &&
040000 tree $(git rev-parse S^{tree}) Z
EOF