summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Fixup.hs3
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