This commit is contained in:
voidlizard 2024-12-07 13:27:41 +03:00
parent 974196ad9e
commit 4724a85a52
1 changed files with 3 additions and 2 deletions

View File

@ -632,7 +632,8 @@ export mref' r = connectedDo $ flip runContT pure do
d <- findGitDir >>= orThrow (OtherGitError "git dir not set")
shallow <- liftIO (readFile (d </> "shallow"))
shallow <- liftIO (try @_ @IOException (readFile (d </> "shallow")))
<&> fromRight mempty
<&> mapMaybe (fromStringMay @GitHash) . lines
<&> HS.fromList
@ -1306,7 +1307,7 @@ theDict = do
let shallowFile = d </> "shallow"
new <- readTVarIO _orphans
current <- try @_ @IOError (liftIO $ LBS8.readFile shallowFile)
current <- try @_ @IOException (liftIO $ LBS8.readFile shallowFile)
<&> fromRight mempty
<&> mapMaybe (fromStringMay @GitHash . LBS8.unpack) . LBS8.lines
<&> HS.union new . HS.fromList