move a file location to Locations.hs

This commit is contained in:
Joey Hess 2011-12-11 14:14:28 -04:00
parent bf6a3b757a
commit 0ba4b1de18
2 changed files with 6 additions and 5 deletions

View file

@ -20,6 +20,7 @@ module Locations (
gitAnnexUnusedLog,
gitAnnexJournalDir,
gitAnnexJournalLock,
gitAnnexIndex,
isLinkToAnnex,
annexHashes,
hashDirMixed,
@ -131,6 +132,10 @@ gitAnnexJournalDir r = addTrailingPathSeparator $ gitAnnexDir r </> "journal"
gitAnnexJournalLock :: Git.Repo -> FilePath
gitAnnexJournalLock r = gitAnnexDir r </> "journal.lck"
{- .git/annex/index is used to stage changes to the git-annex branch -}
gitAnnexIndex :: Git.Repo -> FilePath
gitAnnexIndex r = gitAnnexDir r </> "index"
{- Checks a symlink target to see if it appears to point to annexed content. -}
isLinkToAnnex :: FilePath -> Bool
isLinkToAnnex s = ("/.git/" ++ objectDir) `isInfixOf` s