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:
Joey Hess 2019-08-28 15:46:35 -04:00
parent 4e30b06ffb
commit 36cf61d752
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -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)