add annexDir
This commit is contained in:
parent
ea8ccaa3d5
commit
316264f3e8
1 changed files with 8 additions and 3 deletions
11
Locations.hs
11
Locations.hs
|
@ -12,7 +12,8 @@ module Locations (
|
||||||
fileKey,
|
fileKey,
|
||||||
annexLocation,
|
annexLocation,
|
||||||
annexLocationRelative,
|
annexLocationRelative,
|
||||||
annexTmpLocation
|
annexTmpLocation,
|
||||||
|
annexDir
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Data.String.Utils
|
import Data.String.Utils
|
||||||
|
@ -43,11 +44,15 @@ annexLocation r key =
|
||||||
annexLocationRelative :: Key -> FilePath
|
annexLocationRelative :: Key -> FilePath
|
||||||
annexLocationRelative key = ".git/annex/" ++ (keyFile key)
|
annexLocationRelative key = ".git/annex/" ++ (keyFile key)
|
||||||
|
|
||||||
{- .git-annex/tmp is used for temp files
|
{- The annex directory of a repository.
|
||||||
-
|
-
|
||||||
- Note: Assumes repo is NOT bare. -}
|
- Note: Assumes repo is NOT bare. -}
|
||||||
|
annexDir :: Git.Repo -> FilePath
|
||||||
|
annexDir r = Git.workTree r ++ "/.git/annex"
|
||||||
|
|
||||||
|
{- .git-annex/tmp is used for temp files -}
|
||||||
annexTmpLocation :: Git.Repo -> FilePath
|
annexTmpLocation :: Git.Repo -> FilePath
|
||||||
annexTmpLocation r = (Git.workTree r) ++ "/.git/annex/tmp/"
|
annexTmpLocation r = annexDir r ++ "/tmp/"
|
||||||
|
|
||||||
{- Converts a key into a filename fragment.
|
{- Converts a key into a filename fragment.
|
||||||
-
|
-
|
||||||
|
|
Loading…
Reference in a new issue