some initial support for local bare repos

This relies on git-annex's behavior of reading the config of local repos.
That allows repoIsLocalBare to examine the git config for core.bare.

Hopefully, gitAnnexLocation, gitAnnexDir, and gitAnnexObjectDir
are only used on local repos. But, I have not audited fully, since
they're probably not (see for example copyToRemote). And so,
the functions fall back to their old non-bare-aware behavior for
non-local repos.
This commit is contained in:
Joey Hess 2011-03-03 14:51:57 -04:00
parent 7ea9f52c28
commit d651d4985b
3 changed files with 35 additions and 20 deletions

View file

@ -51,8 +51,8 @@ calcGitLink file key = do
let absfile = case absNormPath cwd file of
Just f -> f
Nothing -> error $ "unable to normalize " ++ filePathToString file
return $ relPathDirToDir (parentDir absfile) (Git.workTree g) ++
annexLocation key
return $ relPathDirToDir (parentDir absfile)
(Git.workTree g) </> ".git" </> annexLocation key
{- Updates the LocationLog when a key's presence changes. -}
logStatus :: Key -> LogStatus -> Annex ()