diff --git a/Annex/Fixup.hs b/Annex/Fixup.hs index 37cbe8f63a..38cb676a1c 100644 --- a/Annex/Fixup.hs +++ b/Annex/Fixup.hs @@ -93,8 +93,8 @@ fixupUnusualRepos r@(Repo { location = l@(Local { worktree = Just w, gitdir = d | needsSubmoduleFixup r = do when (coreSymlinks c) $ (replacedotgit >> unsetcoreworktree) - `catchNonAsync` \_e -> hPutStrLn stderr - "warning: unable to convert submodule to form that will work with git-annex" + `catchNonAsync` \e -> hPutStrLn stderr $ + "warning: unable to convert submodule to form that will work with git-annex: " ++ show e return $ r' { config = M.delete "core.worktree" (config r) } @@ -102,8 +102,8 @@ fixupUnusualRepos r@(Repo { location = l@(Local { worktree = Just w, gitdir = d ( do when (coreSymlinks c) $ (replacedotgit >> worktreefixup) - `catchNonAsync` \_e -> hPutStrLn stderr - "warning: unable to convert .git file to symlink that will work with git-annex" + `catchNonAsync` \e -> hPutStrLn stderr $ + "warning: unable to convert .git file to symlink that will work with git-annex: " ++ show e return r' , return r ) diff --git a/doc/bugs/warning__58___unable_to_convert_submodule_to_form_that_/comment_2_7f4800ee68c98606bc8a3ce959646014._comment b/doc/bugs/warning__58___unable_to_convert_submodule_to_form_that_/comment_2_7f4800ee68c98606bc8a3ce959646014._comment new file mode 100644 index 0000000000..723169a9b4 --- /dev/null +++ b/doc/bugs/warning__58___unable_to_convert_submodule_to_form_that_/comment_2_7f4800ee68c98606bc8a3ce959646014._comment @@ -0,0 +1,20 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2021-01-19T16:14:38Z" + content=""" +Hmm, that happens if it somehow gets an exception while fixing up the .git +file and unsetting core.worktree in the git config. I've modified the code +so it now will display the exception as part of that message. + +If by "get for every file" you mean the same run of git-annex is displaying +it repeatedly, that would be weird -- it's run in early startup not later. + +One way I can see this failing is if core.worktree is not actually set. +Then unsetting it would fail and it would display this message. But it +would not even try to unset core.worktree unless something tells +git-annex that the git directory is located under the parent repo's +.git/modules/ Despite the `git rev-parse` you show, something is +making git-annex still think that is the case. Likely because .git +is not a symlink. +"""]]