mirror of
				https://github.com/nvbn/thefuck.git
				synced 2025-10-31 07:04:12 +00:00 
			
		
		
		
	Suggest git checkout -b (#754)
This fixes https://github.com/nvbn/thefuck/issues/632 This uses `script_parts` instead of `script.startswith` to let it work even if there's extra spaces in the command, e.g. git checkout unknown
This commit is contained in:
		
				
					committed by
					
						 Joseph Frazier
						Joseph Frazier
					
				
			
			
				
	
			
			
			
						parent
						
							9e788196e6
						
					
				
				
					commit
					83cf97dc26
				
			| @@ -52,7 +52,7 @@ def test_get_branches(branches, branch_list, git_branch): | ||||
| @pytest.mark.parametrize('branches, command, new_command', [ | ||||
|     (b'', | ||||
|      Command('git checkout unknown', did_not_match('unknown')), | ||||
|      'git branch unknown && git checkout unknown'), | ||||
|      'git checkout -b unknown'), | ||||
|     (b'', | ||||
|      Command('git commit unknown', did_not_match('unknown')), | ||||
|      'git branch unknown && git commit unknown'), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user