mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
The patch from [bpo-44074]() does not account for a possibly non-English locale and blindly greps for "HEAD branch" in a possibly localized text. Automerge-Triggered-By: GH:pitrou
This commit is contained in:
		
							parent
							
								
									3c0b070f3b
								
							
						
					
					
						commit
						1aa3530314
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -78,11 +78,14 @@ def get_git_remote_default_branch(remote_name): | ||||||
|     It is typically called 'main', but may differ |     It is typically called 'main', but may differ | ||||||
|     """ |     """ | ||||||
|     cmd = "git remote show {}".format(remote_name).split() |     cmd = "git remote show {}".format(remote_name).split() | ||||||
|  |     env = os.environ.copy() | ||||||
|  |     env['LANG'] = 'C' | ||||||
|     try: |     try: | ||||||
|         remote_info = subprocess.check_output(cmd, |         remote_info = subprocess.check_output(cmd, | ||||||
|                                               stderr=subprocess.DEVNULL, |                                               stderr=subprocess.DEVNULL, | ||||||
|                                               cwd=SRCDIR, |                                               cwd=SRCDIR, | ||||||
|                                               encoding='UTF-8') |                                               encoding='UTF-8', | ||||||
|  |                                               env=env) | ||||||
|     except subprocess.CalledProcessError: |     except subprocess.CalledProcessError: | ||||||
|         return None |         return None | ||||||
|     for line in remote_info.splitlines(): |     for line in remote_info.splitlines(): | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Antoine Pitrou
						Antoine Pitrou