git-annex/Types/Backend.hs
Joey Hess 90319afa41 fsck --from
Fscking a remote is now supported. It's done by retrieving
the contents of the specified files from the remote, and checking them,
so can be an expensive operation.

(Several optimisations are possible, to speed it up, of course.. This is
the slow and stupid remote fsck to start with.)

Still, if the remote is a special remote, or a git repository that you
cannot run fsck in locally, it's nice to have the ability to fsck it.

If you have any directory special remotes, now would be a good time to
fsck them, in case you were hit by the data loss bug fixed in the
previous release!
2012-01-19 15:24:05 -04:00

27 lines
674 B
Haskell

{- git-annex key/value backend data type
-
- Most things should not need this, using Types instead
-
- Copyright 2010 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Types.Backend where
import Types.Key
data BackendA a = Backend {
-- name of this backend
name :: String,
-- converts a filename to a key
getKey :: FilePath -> a (Maybe Key),
-- called during fsck to check a key, if the backend has its own checks
fsckKey :: Maybe (Key -> FilePath -> a Bool)
}
instance Show (BackendA a) where
show backend = "Backend { name =\"" ++ name backend ++ "\" }"
instance Eq (BackendA a) where
a == b = name a == name b