found a way to extract InodeCache from git index
This will allow a race-free database transition. It is somewhat hairy in that it depends on an unspecified git output format.
This commit is contained in:
parent
6147130e86
commit
89bdcffdfa
3 changed files with 87 additions and 9 deletions
|
@ -12,6 +12,7 @@
|
|||
|
||||
module Utility.InodeCache (
|
||||
InodeCache,
|
||||
mkInodeCache,
|
||||
InodeComparisonType(..),
|
||||
inodeCacheFileSize,
|
||||
|
||||
|
@ -61,6 +62,10 @@ data InodeCachePrim = InodeCachePrim FileID FileSize MTime
|
|||
newtype InodeCache = InodeCache InodeCachePrim
|
||||
deriving (Show)
|
||||
|
||||
mkInodeCache :: FileID -> FileSize -> POSIXTime -> InodeCache
|
||||
mkInodeCache inode sz mtime = InodeCache $
|
||||
InodeCachePrim inode sz (MTimeHighRes mtime)
|
||||
|
||||
inodeCacheFileSize :: InodeCache -> FileSize
|
||||
inodeCacheFileSize (InodeCache (InodeCachePrim _ sz _)) = sz
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue