t: use sane_unset instead of unset
Change several tests to use the sane_unset function introduced in v1.7.3.1-35-g00648ba instead of the built-in unset function. This fixes a failure I was having on t9130-git-svn-authors-file.sh on Solaris, and prevents several other issues from occurring. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		 Ævar Arnfjörð Bjarmason
					Ævar Arnfjörð Bjarmason
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							d24fbca7a5
						
					
				
				
					commit
					1f5ad6b1a7
				
			| @ -136,7 +136,7 @@ test_expect_success setup ' | |||||||
| 	git format-patch -M --stdout lorem^ >rename-add.patch && | 	git format-patch -M --stdout lorem^ >rename-add.patch && | ||||||
|  |  | ||||||
| 	# reset time | 	# reset time | ||||||
| 	unset test_tick && | 	sane_unset test_tick && | ||||||
| 	test_tick | 	test_tick | ||||||
| ' | ' | ||||||
|  |  | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ run_backend() { | |||||||
| GET() { | GET() { | ||||||
| 	REQUEST_METHOD="GET" && export REQUEST_METHOD && | 	REQUEST_METHOD="GET" && export REQUEST_METHOD && | ||||||
| 	run_backend "/repo.git/$1" && | 	run_backend "/repo.git/$1" && | ||||||
| 	unset REQUEST_METHOD && | 	sane_unset REQUEST_METHOD && | ||||||
| 	if ! grep "Status" act.out >act | 	if ! grep "Status" act.out >act | ||||||
| 	then | 	then | ||||||
| 		printf "Status: 200 OK\r\n" >act | 		printf "Status: 200 OK\r\n" >act | ||||||
| @ -30,8 +30,8 @@ POST() { | |||||||
| 	REQUEST_METHOD="POST" && export REQUEST_METHOD && | 	REQUEST_METHOD="POST" && export REQUEST_METHOD && | ||||||
| 	CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE && | 	CONTENT_TYPE="application/x-$1-request" && export CONTENT_TYPE && | ||||||
| 	run_backend "/repo.git/$1" "$2" && | 	run_backend "/repo.git/$1" "$2" && | ||||||
| 	unset REQUEST_METHOD && | 	sane_unset REQUEST_METHOD && | ||||||
| 	unset CONTENT_TYPE && | 	sane_unset CONTENT_TYPE && | ||||||
| 	if ! grep "Status" act.out >act | 	if ! grep "Status" act.out >act | ||||||
| 	then | 	then | ||||||
| 		printf "Status: 200 OK\r\n" >act | 		printf "Status: 200 OK\r\n" >act | ||||||
|  | |||||||
| @ -95,7 +95,7 @@ test_expect_success 'setup large simple rename' ' | |||||||
| ' | ' | ||||||
|  |  | ||||||
| test_expect_success 'massive simple rename does not spam added files' ' | test_expect_success 'massive simple rename does not spam added files' ' | ||||||
| 	unset GIT_MERGE_VERBOSITY && | 	sane_unset GIT_MERGE_VERBOSITY && | ||||||
| 	git merge --no-stat simple-rename | grep -v Removing >output && | 	git merge --no-stat simple-rename | grep -v Removing >output && | ||||||
| 	test 5 -gt "$(wc -l < output)" | 	test 5 -gt "$(wc -l < output)" | ||||||
| ' | ' | ||||||
|  | |||||||
| @ -96,8 +96,8 @@ test_expect_success 'fresh clone with svn.authors-file in config' ' | |||||||
| 		rm -r "$GIT_DIR" && | 		rm -r "$GIT_DIR" && | ||||||
| 		test x = x"$(git config svn.authorsfile)" && | 		test x = x"$(git config svn.authorsfile)" && | ||||||
| 		test_config="$HOME"/.gitconfig && | 		test_config="$HOME"/.gitconfig && | ||||||
| 		unset GIT_DIR && | 		sane_unset GIT_DIR && | ||||||
| 		unset GIT_CONFIG && | 		sane_unset GIT_CONFIG && | ||||||
| 		git config --global \ | 		git config --global \ | ||||||
| 		  svn.authorsfile "$HOME"/svn-authors && | 		  svn.authorsfile "$HOME"/svn-authors && | ||||||
| 		test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" && | 		test x"$HOME"/svn-authors = x"$(git config svn.authorsfile)" && | ||||||
|  | |||||||
| @ -321,7 +321,7 @@ test_expect_success 'use the same checkout for Git and CVS' ' | |||||||
|  |  | ||||||
| 	(mkdir shared && | 	(mkdir shared && | ||||||
| 	 cd shared && | 	 cd shared && | ||||||
| 	 unset GIT_DIR && | 	 sane_unset GIT_DIR && | ||||||
| 	 cvs co . && | 	 cvs co . && | ||||||
| 	 git init && | 	 git init && | ||||||
| 	 git add " space" && | 	 git add " space" && | ||||||
|  | |||||||
| @ -25,7 +25,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' ' | |||||||
| 	test_when_finished cleanup_git && | 	test_when_finished cleanup_git && | ||||||
| 	( | 	( | ||||||
| 		P4CONFIG=p4config && export P4CONFIG && | 		P4CONFIG=p4config && export P4CONFIG && | ||||||
| 		unset P4PORT P4CLIENT && | 		sane_unset P4PORT P4CLIENT && | ||||||
| 		"$GITP4" clone --verbose --dest="$git" //depot | 		"$GITP4" clone --verbose --dest="$git" //depot | ||||||
| 	) | 	) | ||||||
| ' | ' | ||||||
| @ -37,7 +37,7 @@ test_expect_success 'P4CONFIG and relative dir clone' ' | |||||||
| 	test_when_finished cleanup_git && | 	test_when_finished cleanup_git && | ||||||
| 	( | 	( | ||||||
| 		P4CONFIG=p4config && export P4CONFIG && | 		P4CONFIG=p4config && export P4CONFIG && | ||||||
| 		unset P4PORT P4CLIENT && | 		sane_unset P4PORT P4CLIENT && | ||||||
| 		"$GITP4" clone --verbose --dest="git" //depot | 		"$GITP4" clone --verbose --dest="git" //depot | ||||||
| 	) | 	) | ||||||
| ' | ' | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user