diff options
author | 2016-02-08 15:41:19 -0400 | |
---|---|---|
committer | 2016-02-08 15:41:27 -0400 | |
commit | ac0b50cc251eb683e67b1e8c1905fd6b3fe0df3f (patch) | |
tree | 50136af471aece0d869db86fe08811cbbf3df144 /Annex/Fixup.hs | |
parent | cc18eb7e745bf980f62de261c9fbc8a08b96dd48 (diff) |
init: Fix bugs in submodule .git symlink fixup, that occurred when initializing in a subdirectory of a submodule and a submodule of a submodule.
Diffstat (limited to 'Annex/Fixup.hs')
-rw-r--r-- | Annex/Fixup.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs index 4d9afea91..1cde86390 100644 --- a/Annex/Fixup.hs +++ b/Annex/Fixup.hs @@ -90,8 +90,9 @@ fixupSubmodule r@(Repo { location = l@(Local { worktree = Just w, gitdir = d }) where dotgit = w </> ".git" replacedotgit = whenM (doesFileExist dotgit) $ do + linktarget <- relPathDirToFile w d nukeFile dotgit - createSymbolicLink (w </> d) dotgit + createSymbolicLink linktarget dotgit maybe (error "unset core.worktree failed") (\_ -> return ()) =<< Git.Config.unset "core.worktree" r fixupSubmodule r _ = return r |