diff options
author | 2012-12-07 14:40:31 -0400 | |
---|---|---|
committer | 2012-12-07 14:53:02 -0400 | |
commit | 420038580f6d14b0e5a7b1d41b9806c275c4824e (patch) | |
tree | a7b2689efc1fab9f7c4c977debbcea4c6a69a495 /Locations.hs | |
parent | fe2adaccd1cbf6ba6a4b36dbac9bff7241251a78 (diff) |
support for storing files in direct mode
Diffstat (limited to 'Locations.hs')
-rw-r--r-- | Locations.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Locations.hs b/Locations.hs index db97bbec7..36172d621 100644 --- a/Locations.hs +++ b/Locations.hs @@ -11,6 +11,7 @@ module Locations ( keyPaths, keyPath, gitAnnexLocation, + gitAnnexMapping, annexLocations, annexLocation, gitAnnexDir, @@ -107,6 +108,13 @@ gitAnnexLocation key r check locs@(l:_) = fromMaybe l <$> firstM doesFileExist locs check [] = error "internal" +{- File that maps from a key to the file(s) in the git repository. + - Used in direct mode. -} +gitAnnexMapping :: Key -> Git.Repo -> IO FilePath +gitAnnexMapping key r = do + loc <- gitAnnexLocation key r + return $ loc ++ ".map" + {- The annex directory of a repository. -} gitAnnexDir :: Git.Repo -> FilePath gitAnnexDir r = addTrailingPathSeparator $ Git.localGitDir r </> annexDir |