optimisation
authorJoey Hess <joeyh@joeyh.name>
Wed, 21 Apr 2021 20:02:56 +0000 (16:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 21 Apr 2021 20:02:56 +0000 (16:02 -0400)
Avoid trying to read private journal files when no private uuids are
known.

Annex/Journal.hs

index 359ebe07a704af3a60940e5a947f65fe4622bcd2..9d67d5ba87c6562db645b44c83dd90a6e67315ae 100644 (file)
@@ -99,7 +99,7 @@ data GetPrivate = GetPrivate Bool
  -}
 getJournalFileStale :: GetPrivate -> RawFilePath -> Annex (Maybe L.ByteString)
 getJournalFileStale (GetPrivate getprivate) file = inRepo $ \g -> 
-       if getprivate
+       if getprivate && privateUUIDsKnown
                then do
                        x <- getfrom (gitAnnexJournalDir g)
                        y <- getfrom (gitAnnexPrivateJournalDir g)