summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-16 19:41:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-16 19:41:12 (GMT)
commit5480861c24b6f5830c2301ae2f50e21ef3cdeaf2 (patch)
tree4b3ede0c2f1e4e01541aadc45eb74136b5221994 /t
parenta1ee40f3a2c626ad2b66e9fadf9a4064c3c5118c (diff)
parent6280dfdc3b22aa821521182781e5a247b19fb515 (diff)
downloadgit-5480861c24b6f5830c2301ae2f50e21ef3cdeaf2.zip
git-5480861c24b6f5830c2301ae2f50e21ef3cdeaf2.tar.gz
git-5480861c24b6f5830c2301ae2f50e21ef3cdeaf2.tar.bz2
Merge branch 'jk/fast-export-quote-path' into maint
* jk/fast-export-quote-path: fast-export: quote paths in output
Diffstat (limited to 't')
-rwxr-xr-xt/t9350-fast-export.sh28
1 files changed, 27 insertions, 1 deletions
diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
index f823c05..950d0ff 100755
--- a/t/t9350-fast-export.sh
+++ b/t/t9350-fast-export.sh
@@ -228,7 +228,7 @@ test_expect_success 'fast-export -C -C | fast-import' '
mkdir new &&
git --git-dir=new/.git init &&
git fast-export -C -C --signed-tags=strip --all > output &&
- grep "^C \"file6\" \"file7\"\$" output &&
+ grep "^C file6 file7\$" output &&
cat output |
(cd new &&
git fast-import &&
@@ -414,4 +414,30 @@ test_expect_success SYMLINKS 'directory becomes symlink' '
(cd result && git show master:foo)
'
+test_expect_success 'fast-export quotes pathnames' '
+ git init crazy-paths &&
+ (cd crazy-paths &&
+ blob=`echo foo | git hash-object -w --stdin` &&
+ git update-index --add \
+ --cacheinfo 100644 $blob "$(printf "path with\\nnewline")" \
+ --cacheinfo 100644 $blob "path with \"quote\"" \
+ --cacheinfo 100644 $blob "path with \\backslash" \
+ --cacheinfo 100644 $blob "path with space" &&
+ git commit -m addition &&
+ git ls-files -z -s | perl -0pe "s{\\t}{$&subdir/}" >index &&
+ git read-tree --empty &&
+ git update-index -z --index-info <index &&
+ git commit -m rename &&
+ git read-tree --empty &&
+ git commit -m deletion &&
+ git fast-export HEAD >export.out &&
+ git rev-list HEAD >expect &&
+ git init result &&
+ cd result &&
+ git fast-import <../export.out &&
+ git rev-list HEAD >actual &&
+ test_cmp ../expect actual
+ )
+'
+
test_done