From 9b4db1bab69b678a13a1d0d2ca74a48626364c93 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 2 Mar 2015 16:43:44 -0400 Subject: Submodules are now supported by git-annex! Seems to work, but still experimental until it's been tested more. When repositories are on filesystems not supporting symlinks, the .git dir symlink trick cannot be used. Since we're going to be in direct mode anyway, the .git dir symlink is not strictly needed. However, I have not fixed the code that creates new annex symlinks to handle this case -- the committed symlinks will be wrong. git annex sync happens to currently fail in a submodule using direct mode, because there's no HEAD ref. That also needs to be dealt with to get this fully working in crippled filesystems. Leaving http://github.com/datalad/datalad/issues/44 open until these issues are dealt with. --- Annex.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Annex.hs') diff --git a/Annex.hs b/Annex.hs index f85c7e0f2..e1a32faca 100644 --- a/Annex.hs +++ b/Annex.hs @@ -37,7 +37,7 @@ module Annex ( import Common import qualified Git import qualified Git.Config -import Annex.Direct.Fixup +import Annex.Fixup import Git.CatFile import Git.CheckAttr import Git.CheckIgnore @@ -183,12 +183,13 @@ newState c r = AnnexState } {- Makes an Annex state object for the specified git repo. - - Ensures the config is read, if it was not already. -} + - Ensures the config is read, if it was not already, and performs + - any necessary git repo fixups. -} new :: Git.Repo -> IO AnnexState new r = do r' <- Git.Config.read =<< Git.relPath r let c = extractGitConfig r' - newState c <$> if annexDirect c then fixupDirect r' else return r' + newState c <$> fixupRepo r' c {- Performs an action in the Annex monad from a starting state, - returning a new state. -} -- cgit v1.2.3