Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t3006-ls-files-long.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t3006-ls-files-long.sh` 40 lines ยท 901 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='overly long paths' 4 5 . ./test-lib.sh 6 7 test_expect_success setup ' 8 p=filefilefilefilefilefilefilefile && 9 p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p && 10 p=$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p$p && 11 12 path_a=${p}_a && 13 path_z=${p}_z && 14 15 blob_a=$(echo frotz | git hash-object -w --stdin) && 16 blob_z=$(echo nitfol | git hash-object -w --stdin) && 17 18 pat="100644 %s 0\t%s\n" 19 ' 20 21 test_expect_success 'overly-long path by itself is not a problem' ' 22 printf "$pat" "$blob_a" "$path_a" | 23 git update-index --add --index-info && 24 echo "$path_a" >expect && 25 git ls-files >actual && 26 test_cmp expect actual 27 ' 28 29 test_expect_success 'overly-long path does not replace another by mistake' ' 30 printf "$pat" "$blob_a" "$path_a" "$blob_z" "$path_z" | 31 git update-index --add --index-info && 32 ( 33 echo "$path_a" && 34 echo "$path_z" 35 ) >expect && 36 git ls-files >actual && 37 test_cmp expect actual 38 ' 39 40 test_done