assistant: Avoid unncessary git repository repair
In a situation where git fsck gets confused about a commit that is made while it's running. Sponsored-by: Graham Spencer on Patreon
This commit is contained in:
parent
ee2e7c28a6
commit
d2c48404a8
6 changed files with 62 additions and 17 deletions
|
@ -185,7 +185,7 @@ runActivity' urlrenderer (ScheduledSelfFsck _ d) = do
|
|||
g <- liftAnnex gitRepo
|
||||
fsckresults <- showFscking urlrenderer Nothing $ tryNonAsync $ do
|
||||
void $ batchCommand program (Param "fsck" : annexFsckParams d)
|
||||
Git.Fsck.findBroken True g
|
||||
Git.Fsck.findBroken True False g
|
||||
u <- liftAnnex getUUID
|
||||
void $ repairWhenNecessary urlrenderer u Nothing fsckresults
|
||||
mapM_ reget =<< liftAnnex (dirKeys gitAnnexBadDir)
|
||||
|
@ -214,7 +214,7 @@ runActivity' urlrenderer (ScheduledRemoteFsck u s d) = dispatch =<< liftAnnex (r
|
|||
fsckresults <- showFscking urlrenderer (Just rmt) $ tryNonAsync $ do
|
||||
void annexfscker
|
||||
if Git.repoIsLocal repo && not (Git.repoIsLocalUnknown repo)
|
||||
then Just <$> Git.Fsck.findBroken True repo
|
||||
then Just <$> Git.Fsck.findBroken True True repo
|
||||
else pure Nothing
|
||||
maybe noop (void . repairWhenNecessary urlrenderer u (Just rmt)) fsckresults
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue