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/t9601-cvsimport-vendor-branch.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 / t9601-cvsimport-vendor-branch.sh` 88 lines ยท 2137 bytes Raw Blame History 1 #!/bin/sh 2 3 # Description of the files in the repository: 4 # 5 # imported-once.txt: 6 # 7 # Imported once. 1.1 and 1.1.1.1 should be identical. 8 # 9 # imported-twice.txt: 10 # 11 # Imported twice. HEAD should reflect the contents of the 12 # second import (i.e., have the same contents as 1.1.1.2). 13 # 14 # imported-modified.txt: 15 # 16 # Imported, then modified on HEAD. HEAD should reflect the 17 # modification. 18 # 19 # imported-modified-imported.txt: 20 # 21 # Imported, then modified on HEAD, then imported again. 22 # 23 # added-imported.txt,v: 24 # 25 # Added with 'cvs add' to create 1.1, then imported with 26 # completely different contents to create 1.1.1.1, therefore the 27 # vendor branch was never the default branch. 28 # 29 # imported-anonymously.txt: 30 # 31 # Like imported-twice.txt, but with a vendor branch whose branch 32 # tag has been removed. 33 34 test_description='git cvsimport handling of vendor branches' 35 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main 36 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME 37 38 . ./lib-cvs.sh 39 40 setup_cvs_test_repository t9601 41 42 test_expect_success PERL 'import a module with a vendor branch' ' 43 44 git cvsimport -C module-git module 45 46 ' 47 48 test_expect_success PERL 'check HEAD out of cvs repository' 'test_cvs_co main' 49 50 test_expect_success PERL 'check main out of git repository' 'test_git_co main' 51 52 test_expect_success PERL 'check a file that was imported once' ' 53 54 test_cmp_branch_file main imported-once.txt 55 56 ' 57 58 test_expect_failure PERL 'check a file that was imported twice' ' 59 60 test_cmp_branch_file main imported-twice.txt 61 62 ' 63 64 test_expect_success PERL 'check a file that was imported then modified on HEAD' ' 65 66 test_cmp_branch_file main imported-modified.txt 67 68 ' 69 70 test_expect_success PERL 'check a file that was imported, modified, then imported again' ' 71 72 test_cmp_branch_file main imported-modified-imported.txt 73 74 ' 75 76 test_expect_success PERL 'check a file that was added to HEAD then imported' ' 77 78 test_cmp_branch_file main added-imported.txt 79 80 ' 81 82 test_expect_success PERL 'a vendor branch whose tag has been removed' ' 83 84 test_cmp_branch_file main imported-anonymously.txt 85 86 ' 87 88 test_done