 06d531486e
			
		
	
	06d531486e
	
	
	
		
			
			Carefully excluding t1309, which sees independent development elsewhere at the time of writing, we transition above-mentioned tests to the default branch name `main`. This trick was performed via $ (cd t && sed -i -e 's/master/main/g' -e 's/MASTER/MAIN/g' \ -e 's/Master/Main/g' -e 's/naster/nain/g' -- t[01]*.sh && git checkout HEAD -- t1309\*) Note that t5533 contains a variation of the name `master` (`naster`) that we rename here, too. This allows us to define `GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main` for those tests. Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
		
			
				
	
	
		
			36 lines
		
	
	
		
			673 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			673 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| test_description='test multi-tree read-tree without merging'
 | |
| 
 | |
| GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
 | |
| export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
 | |
| 
 | |
| . ./test-lib.sh
 | |
| . "$TEST_DIRECTORY"/lib-read-tree.sh
 | |
| 
 | |
| test_expect_success setup '
 | |
| 	echo one >a &&
 | |
| 	git add a &&
 | |
| 	git commit -m initial &&
 | |
| 	git tag initial &&
 | |
| 	echo two >b &&
 | |
| 	git add b &&
 | |
| 	git commit -m second &&
 | |
| 	git checkout -b side initial &&
 | |
| 	echo three >a &&
 | |
| 	mkdir b &&
 | |
| 	echo four >b/c &&
 | |
| 	git add b/c &&
 | |
| 	git commit -m third
 | |
| '
 | |
| 
 | |
| test_expect_success 'multi-read' '
 | |
| 	read_tree_must_succeed initial main side &&
 | |
| 	test_write_lines a b/c >expect &&
 | |
| 	git ls-files >actual &&
 | |
| 	test_cmp expect actual
 | |
| '
 | |
| 
 | |
| test_done
 | |
| 
 |