From ba7ecf68c0909051dceba67f0e3f69990c4613a6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Oct 2015 17:11:52 -0400 Subject: [PATCH] analysis --- Logs/PreferredContent.hs | 9 +++++++-- ...mment_3_51849db15fdd2b79a82f6eba86479134._comment | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 doc/bugs/git_annex_preferred_content_strange_behavior/comment_3_51849db15fdd2b79a82f6eba86479134._comment diff --git a/Logs/PreferredContent.hs b/Logs/PreferredContent.hs index c21d67010f..1e631f86ef 100644 --- a/Logs/PreferredContent.hs +++ b/Logs/PreferredContent.hs @@ -57,8 +57,13 @@ checkMap getmap mu notpresent mkey afile d = do u <- maybe getUUID return mu m <- getmap case M.lookup u m of - Nothing -> return d - Just matcher -> checkMatcher matcher mkey afile notpresent d + Nothing -> do + liftIO $ print ("default for", u, d) + return d + Just matcher -> do + r <- checkMatcher matcher mkey afile notpresent d + liftIO $ print ("checking for ", u, r) + return r preferredContentMap :: Annex (FileMatcherMap Annex) preferredContentMap = maybe (fst <$> preferredRequiredMapsLoad) return diff --git a/doc/bugs/git_annex_preferred_content_strange_behavior/comment_3_51849db15fdd2b79a82f6eba86479134._comment b/doc/bugs/git_annex_preferred_content_strange_behavior/comment_3_51849db15fdd2b79a82f6eba86479134._comment new file mode 100644 index 0000000000..680429841e --- /dev/null +++ b/doc/bugs/git_annex_preferred_content_strange_behavior/comment_3_51849db15fdd2b79a82f6eba86479134._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2015-10-06T21:10:44Z" + content=""" +Intriguingly, debugging shows it's checking the preferred content of +the repo it's in, rather than of the repo it's copying to! + +And indeed, git-annex sync --content doesn't copy the file to B. +So, this bug is in `git-annex copy --to --auto`, and not in preferred +content handling in general. +"""]]