remove redundant test
populatePointerFile checks the same thing
This commit is contained in:
parent
0ae11e92c5
commit
f2a4db724c
1 changed files with 7 additions and 8 deletions
|
@ -144,11 +144,10 @@ emitPointer = putStr . formatPointer
|
||||||
-- the pointer copy. It will then be populated with the content.
|
-- the pointer copy. It will then be populated with the content.
|
||||||
getMoveRaceRecovery :: Key -> FilePath -> Annex ()
|
getMoveRaceRecovery :: Key -> FilePath -> Annex ()
|
||||||
getMoveRaceRecovery k file = void $ tryNonAsync $
|
getMoveRaceRecovery k file = void $ tryNonAsync $
|
||||||
liftIO (isPointerFile file) >>= \k' -> when (Just k == k') $
|
whenM (inAnnex k) $ do
|
||||||
whenM (inAnnex k) $ do
|
obj <- calcRepo (gitAnnexLocation k)
|
||||||
obj <- calcRepo (gitAnnexLocation k)
|
-- Cannot restage because git add is running and has
|
||||||
-- Cannot restage because git add is running and has
|
-- the index locked.
|
||||||
-- the index locked.
|
populatePointerFile (Restage False) k obj file >>= \case
|
||||||
populatePointerFile (Restage False) k obj file >>= \case
|
Nothing -> return ()
|
||||||
Nothing -> return ()
|
Just ic -> Database.Keys.addInodeCaches k [ic]
|
||||||
Just ic -> Database.Keys.addInodeCaches k [ic]
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue