From: Joey Hess Date: Mon, 9 Nov 2020 21:50:35 +0000 (-0400) Subject: add debug in two unusual situations X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~102^2~108 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e81bb05b25907641de983c57d7849aac251900f7;p=git-annex.git add debug in two unusual situations --- diff --git a/Command/Add.hs b/Command/Add.hs index 3b411c8f10..800b56bf87 100644 --- a/Command/Add.hs +++ b/Command/Add.hs @@ -27,6 +27,8 @@ import Utility.FileMode import Utility.OptParse import qualified Utility.RawFilePath as R +import System.Log.Logger (debugM) + cmd :: Command cmd = notBareRepo $ withGlobalOptions opts $ @@ -170,13 +172,13 @@ start o si file addunlockedmatcher = do Just s | isSymbolicLink s -> fixuplink key _ -> add fixuplink key = starting "add" (ActionItemWorkTreeFile file) si $ do - -- the annexed symlink is present but not yet added to git + liftIO $ debugM "add" "adding existing annex symlink to git" liftIO $ removeFile (fromRawFilePath file) addLink (checkGitIgnoreOption o) file key Nothing next $ cleanup key =<< inAnnex key fixuppointer key = starting "add" (ActionItemWorkTreeFile file) si $ do - -- the pointer file is present, but not yet added to git + liftIO $ debugM "add" "adding pointer file to git" Database.Keys.addAssociatedFile key =<< inRepo (toTopFilePath file) next $ addFile (checkGitIgnoreOption o) file