fix bug in unlocked file scanner that skipped over executable unlocked files

This commit is contained in:
Joey Hess 2016-04-14 13:07:46 -04:00
parent 481eb1de03
commit d05a75e45a
Failed to extract signature
4 changed files with 27 additions and 1 deletions

View file

@ -170,7 +170,10 @@ scanAssociatedFiles = whenM (isJust <$> inRepo Git.Branch.current) $
dropallassociated h = liftIO $ flip SQL.queueDb h $
delete $ from $ \(_r :: SqlExpr (Entity SQL.Associated)) ->
return ()
isregfile i = Git.Types.toBlobType (Git.LsTree.mode i) == Just Git.Types.FileBlob
isregfile i = case Git.Types.toBlobType (Git.LsTree.mode i) of
Just Git.Types.FileBlob -> True
Just Git.Types.ExecutableBlob -> True
_ -> False
add h i k = liftIO $ flip SQL.queueDb h $
void $ insertUnique $ SQL.Associated
(toIKey k)