3 test_description='overly long paths'
6 test_expect_success setup '
7 p=filefilefilefilefilefilefilefile &&
8 p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p &&
9 p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p &&
14 blob_a=$(echo frotz | git hash-object -w --stdin) &&
15 blob_z=$(echo nitfol | git hash-object -w --stdin) &&
17 pat="100644 %s 0\t%s\n"
20 test_expect_success 'overly-long path by itself is not a problem' '
21 printf "$pat" "$blob_a" "$path_a" |
22 git update-index --add --index-info &&
23 echo "$path_a" >expect &&
24 git ls-files >actual &&
25 test_cmp expect actual
28 test_expect_success 'overly-long path does not replace another by mistake' '
29 printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" |
30 git update-index --add --index-info &&
35 git ls-files >actual &&
36 test_cmp expect actual