maxsize of 0 to disable
authorJoey Hess <joeyh@joeyh.name>
Mon, 9 Sep 2024 13:32:43 +0000 (09:32 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 9 Sep 2024 13:32:43 +0000 (09:32 -0400)
CHANGELOG
Limit.hs
doc/git-annex-maxsize.mdwn

index 9abab02c8521e0ac73c7b4ed23b13d41245dc9f2..80f728186f589d1fa2504da48b2a60765019fd2d 100644 (file)
--- 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 <id@joeyh.name>  Tue, 03 Sep 2024 12:38:42 -0400
 
index 134d70e826d107b8a9841e4b7430483d532485a3..4ef4005abeda056aa19a187cc2c057691b3fdd7b 100644 (file)
--- 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
index 5bbfb99d1ab52522b8507eda753410a77f724d4b..06821415b3bcb48add7a5262ecce8f33b76e6409 100644 (file)
@@ -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`