path: root/t
diff options
authorRene Scharfe <>2006-03-25 22:21:07 (GMT)
committerJunio C Hamano <>2006-03-26 00:40:34 (GMT)
commit4c691724f175573a2dc4118782744cb0e852ab41 (patch)
treeb6dadb1e5cf67c2d458a89fc3d4ae7af84edc239 /t
parent86da1c567da0421649cb1e8e999311012c764337 (diff)
tar-tree: Use the prefix field of a tar header
... to store parts of the path, if possible. This allows us to avoid writing extended headers in certain cases (long pathes can only be split at '/' chars). Also adds a file to the test repo with a 100 chars long directory name. Even old versions of tar that don't understand POSIX extended headers should be able to handle this testcase. Btw.: The longest path in the kernel tree currently has 70 chars. Together with a 30 chars long prefix this would already cross the field limit of 100 chars. Signed-off-by: Rene Scharfe <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't')
1 files changed, 3 insertions, 0 deletions
diff --git a/t/ b/t/
index adc5e93..278eb66 100755
--- a/t/
+++ b/t/
@@ -34,6 +34,9 @@ test_expect_success \
mkdir a/bin &&
cp /bin/sh a/bin &&
ln -s a a/l1 &&
+ (p=long_path_to_a_file && cd a &&
+ for depth in 1 2 3 4 5; do mkdir $p && cd $p; done &&
+ echo text >file_with_long_path) &&
(cd a && find .) | sort >a.lst'
test_expect_success \