diff --git a/CHANGELOG b/CHANGELOG index 6f7f9afac6..ae4c2e96ad 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,11 @@ +git-annex (7.20190731) UNRELEASED; urgency=medium + + * Use the same optimisation for --in=here as has always been + used for --in=. rather than the slow code path that unncessarily + queries the git-annex branch. + + -- Joey Hess Thu, 01 Aug 2019 00:11:56 -0400 + git-annex (7.20190730) upstream; urgency=medium * Improved probing when CoW copies can be made between files on the same diff --git a/Limit.hs b/Limit.hs index 6c48100564..67d15400bc 100644 --- a/Limit.hs +++ b/Limit.hs @@ -110,15 +110,15 @@ matchMagic limitname _ _ Nothing _ = {- Adds a limit to skip files not believed to be present - in a specfied repository. Optionally on a prior date. -} addIn :: String -> Annex () -addIn s = addLimit =<< mk +addIn s = do + u <- Remote.nameToUUID name + hereu <- getUUID + addLimit $ if u == hereu && null date + then use inhere + else use (inuuid u) where (name, date) = separate (== '@') s - mk - | name == "." = if null date - then use inhere - else use . inuuid =<< getUUID - | otherwise = use . inuuid =<< Remote.nameToUUID name - use a = return $ Right $ \notpresent -> checkKey (a notpresent) + use a = Right $ checkKey . a inuuid u notpresent key | null date = do us <- Remote.keyLocations key