Reset --hard after the first git init
We don't know what revision the tarball was when homebrew was installed, so all we can do really is hard reset. In theory some set of git commands should suffice, but apparently --soft and --mixed resets ended up putting stuff in the index which would break subsequent `brew updates`. Fixes Homebrew/homebrew#6851
This commit is contained in:
		
							parent
							
								
									c76ae1a94f
								
							
						
					
					
						commit
						554147fa99
					
				@ -42,7 +42,7 @@ class RefreshBrew
 | 
			
		||||
        begin
 | 
			
		||||
          safe_system "git init"
 | 
			
		||||
          safe_system "git fetch #{REPOSITORY_URL}"
 | 
			
		||||
          safe_system "git reset --soft FETCH_HEAD"
 | 
			
		||||
          safe_system "git reset --hard FETCH_HEAD"
 | 
			
		||||
        rescue Exception
 | 
			
		||||
          safe_system "rm -rf .git"
 | 
			
		||||
          raise
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user