mirror of
				https://github.com/cuberite/polarssl.git
				synced 2025-11-04 04:32:24 -05:00 
			
		
		
		
	abi_check: Allow checking current checkout
Without a "--detach" option, git worktree will refuse to checkout a branch that's already checked out. This makes the abi_check.py script not very useful for checking the currently checked out branch, as git will error that the branch is already checked out. Add the "--detach" option to check out the new temporary worktree in detached head mode. This is acceptable because we aren't planning on working on the branch and just want a checkout to do ABI checking from.
This commit is contained in:
		
							parent
							
								
									484ee33c35
								
							
						
					
					
						commit
						7acb0cf01e
					
				@ -64,7 +64,7 @@ class AbiChecker(object):
 | 
				
			|||||||
        )
 | 
					        )
 | 
				
			||||||
        git_worktree_path = tempfile.mkdtemp()
 | 
					        git_worktree_path = tempfile.mkdtemp()
 | 
				
			||||||
        worktree_process = subprocess.Popen(
 | 
					        worktree_process = subprocess.Popen(
 | 
				
			||||||
            [self.git_command, "worktree", "add", git_worktree_path, git_rev],
 | 
					            [self.git_command, "worktree", "add", "--detach", git_worktree_path, git_rev],
 | 
				
			||||||
            cwd=self.repo_path,
 | 
					            cwd=self.repo_path,
 | 
				
			||||||
            stdout=subprocess.PIPE,
 | 
					            stdout=subprocess.PIPE,
 | 
				
			||||||
            stderr=subprocess.STDOUT
 | 
					            stderr=subprocess.STDOUT
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user