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/t9304-fast-import-marks.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 / t9304-fast-import-marks.sh` 82 lines ยท 2414 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='test exotic situations with marks' 4 5 . ./test-lib.sh 6 7 test_expect_success 'setup dump of basic history' ' 8 test_commit one && 9 git fast-export --export-marks=marks HEAD >dump 10 ' 11 12 test_expect_success 'setup large marks file' ' 13 # normally a marks file would have a lot of useful, unique 14 # marks. But for our purposes, just having a lot of nonsense 15 # ones is fine. Start at 1024 to avoid clashing with marks 16 # legitimately used in our tiny dump. 17 blob=$(git rev-parse HEAD:one.t) && 18 for i in $(test_seq 1024 16384) 19 do 20 echo ":$i $blob" || return 1 21 done >>marks 22 ' 23 24 test_expect_success 'import with large marks file' ' 25 git fast-import --import-marks=marks dump 33 ' 34 35 test_expect_success 'setup submodule mapping with large id' ' 36 old=$(git rev-parse HEAD:sub) && 37 new=$(echo $old | sed s/./a/g) && 38 echo ":12345 $old" >from && 39 echo ":12345 $new" >to 40 ' 41 42 test_expect_success 'import with submodule mapping' ' 43 git init dst && 44 git -C dst fast-import \ 45 --rewrite-submodules-from=sub:../from \ 46 --rewrite-submodules-to=sub:../to \ 47 actual && 49 echo "$new" >expect && 50 test_cmp expect actual 51 ' 52 53 test_expect_success 'paths adjusted for relative subdir' ' 54 git init deep-dst && 55 mkdir deep-dst/subdir && 56 >deep-dst/subdir/empty-marks && 57 git -C deep-dst/subdir fast-import \ 58 --rewrite-submodules-from=sub:../../from \ 59 --rewrite-submodules-to=sub:../../to \ 60 --import-marks=empty-marks \ 61 --export-marks=exported-marks \ 62 --export-pack-edges=exported-edges \ 63