From 811dd95453be1f6bf556d2ec29023d63c18b3ec5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 9 Sep 2024 09:32:43 -0400 Subject: [PATCH] maxsize of 0 to disable --- CHANGELOG | 1 + Limit.hs | 1 + doc/git-annex-maxsize.mdwn | 2 ++ 3 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9abab02c85..80f728186f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ git-annex (10.20240832) UNRELEASED; urgency=medium and make it never match. This also applies to "not balanced" and "not sizebalanced". * Fix --explain display of onlyingroup preferred content expression. + * Allow maxsize to be set to 0 to stop checking maxsize for a repository. -- Joey Hess Tue, 03 Sep 2024 12:38:42 -0400 diff --git a/Limit.hs b/Limit.hs index 134d70e826..4ef4005abe 100644 --- a/Limit.hs +++ b/Limit.hs @@ -634,6 +634,7 @@ limitFullyBalanced' = limitFullyBalanced'' $ \n key candidates -> do threshhold <- annexFullyBalancedThreshhold <$> Annex.getGitConfig let toofull u = case (M.lookup u maxsizes, M.lookup u sizemap) of + (Just (MaxSize 0), _) -> False (Just (MaxSize maxsize), Just (RepoSize reposize)) -> fromIntegral reposize >= fromIntegral maxsize * threshhold _ -> False diff --git a/doc/git-annex-maxsize.mdwn b/doc/git-annex-maxsize.mdwn index 5bbfb99d1a..06821415b3 100644 --- a/doc/git-annex-maxsize.mdwn +++ b/doc/git-annex-maxsize.mdwn @@ -40,6 +40,8 @@ thing stored on that drive, and `annex.diskreserve` is configured to 1 gigabyte, then it would make sense to run `git-annex maxsize here "999 gigabytes"` +To stop checking maximum size of a repository, set the maxsize to 0. + # OPTIONS * `--bytes` -- 2.30.2