gitweb: Fix actionless dispatch for non-existent objects
When gitweb URL does not provide action explicitly, e.g. http://git.example.org/repo.git/branch dispatch() tries to guess action (view to be used) based on remaining parameters. Among others it is based on the type of requested object, which gave problems when asking for non-existent branch or file (for example misspelt name). Now undefined $action from dispatch() should not result in problems. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							5f4d133fca
						
					
				
				
					commit
					18ab83e856
				
			@ -403,6 +403,14 @@ test_expect_success \
 | 
			
		||||
	'path_info: project/branch:dir/' \
 | 
			
		||||
	'gitweb_run "" "/.git/master:foo/"'
 | 
			
		||||
 | 
			
		||||
test_expect_success \
 | 
			
		||||
	'path_info: project/branch (non-existent)' \
 | 
			
		||||
	'gitweb_run "" "/.git/non-existent"'
 | 
			
		||||
 | 
			
		||||
test_expect_success \
 | 
			
		||||
	'path_info: project/branch:filename (non-existent branch)' \
 | 
			
		||||
	'gitweb_run "" "/.git/non-existent:non-existent"'
 | 
			
		||||
 | 
			
		||||
test_expect_success \
 | 
			
		||||
	'path_info: project/branch:file (non-existent)' \
 | 
			
		||||
	'gitweb_run "" "/.git/master:non-existent"'
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user