simplification
Whether or not there's a false index, it can't Restage here. When there's a false index, restaging would alter it and not the real index, but it fails anyway because that index is locked. When there's not a false index, the index is locked, and so restaging can't alter it.
This commit is contained in:
		
					parent
					
						
							
								4e30b06ffb
							
						
					
				
			
			
				commit
				
					
						36cf61d752
					
				
			
		
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
					@ -55,10 +55,7 @@ seek ps = lockPreCommitHook $ do
 | 
				
			||||||
				-- files in the worktree won't
 | 
									-- files in the worktree won't
 | 
				
			||||||
				-- be populated, so populate them
 | 
									-- be populated, so populate them
 | 
				
			||||||
				-- here
 | 
									-- here
 | 
				
			||||||
				( Command.Smudge.updateSmudged 
 | 
									( Command.Smudge.updateSmudged (Restage False)
 | 
				
			||||||
					-- When there's a false index,
 | 
					 | 
				
			||||||
					-- restaging the files won't work.
 | 
					 | 
				
			||||||
					. Restage =<< liftIO Git.haveFalseIndex
 | 
					 | 
				
			||||||
				-- inject unlocked files into the annex
 | 
									-- inject unlocked files into the annex
 | 
				
			||||||
				-- (not needed when repo version uses
 | 
									-- (not needed when repo version uses
 | 
				
			||||||
				-- unlocked pointer files)
 | 
									-- unlocked pointer files)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue