From: Joey Hess Date: Mon, 9 Mar 2020 19:55:34 +0000 (-0400) Subject: guard against unsafe git ls-files uses X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~126^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3440b77d1e477bad716f5fbdbea977cbe9272c50;p=git-annex.git guard against unsafe git ls-files uses This breaks several parts of the upgrade code, when upgrading remotes of the current repo, but those parts were buggy, and will need to be fixed somehow anyway. --- diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs index c15397a755..31a74d4283 100644 --- a/Git/LsFiles.hs +++ b/Git/LsFiles.hs @@ -320,7 +320,7 @@ reduceUnmerged c (i:is) = reduceUnmerged (new:c) rest - point in the future. If the output is not as expected, will use Nothing. -} inodeCaches :: [RawFilePath] -> Repo -> IO ([(FilePath, Maybe InodeCache)], IO Bool) -inodeCaches locs repo = do +inodeCaches locs repo = guardSafeForLsFiles repo $ do (ls, cleanup) <- pipeNullSplit params repo return (parse Nothing (map decodeBL ls), cleanup) where