From 02cfef1f912887e8a7e21990aa3311e61042606e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 May 2023 13:25:46 -0400 Subject: [PATCH] uninit: Avoid buffering the names of all annexed files in memory Oops, using the same list twice does prevent streaming in constant memory. Sponsored-by: unqueued on Patreon --- CHANGELOG | 1 + Command/Uninit.hs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7628b5733d..09df02f01d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,7 @@ git-annex (10.20230408) UNRELEASED; urgency=medium * reinject: Fix support for operating on multiple pairs of files and keys. * importfeed: Support -J * importfeed: Support --json-progress + * uninit: Avoid buffering the names of all annexed files in memory. -- Joey Hess Sat, 08 Apr 2023 13:57:18 -0400 diff --git a/Command/Uninit.hs b/Command/Uninit.hs index 48453392f8..21414b7070 100644 --- a/Command/Uninit.hs +++ b/Command/Uninit.hs @@ -50,13 +50,13 @@ check = do seek :: CommandParams -> CommandSeek seek = withNothing $ do - l <- workTreeItems ww [] withFilesNotInGit (CheckGitIgnore False) (WarnUnmatchWorkTreeItems "uninit") checksymlinks - l - withFilesInGitAnnex ww (Command.Unannex.seeker True) l + =<< workTreeItems ww [] + withFilesInGitAnnex ww (Command.Unannex.seeker True) + =<< workTreeItems ww [] finish where ww = WarnUnmatchLsFiles "uninit" -- 2.30.2