Merge branch 'master' into bwlimit
authorJoey Hess <joeyh@joeyh.name>
Wed, 22 Sep 2021 14:48:27 +0000 (10:48 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 22 Sep 2021 14:48:27 +0000 (10:48 -0400)
1  2 
Annex/Transfer.hs
CHANGELOG
Types/GitConfig.hs

index c2c3b582ec626b6dc66e0f61a1f5827848a36e06,c6597baec26b44edb2df453937dccd7b001921f2..b0d53a66a3d0fd84673b791beaf1053580725d57
@@@ -19,8 -19,6 +19,7 @@@ module Annex.Transfer 
        noRetry,
        stdRetry,
        pickRemote,
-       stallDetection,
 +      bwLimit,
  ) where
  
  import Annex.Common
@@@ -401,15 -401,3 +402,9 @@@ lessActiveFirst :: M.Map Remote Intege
  lessActiveFirst active a b
        | Remote.cost a == Remote.cost b = comparing (`M.lookup` active) a b
        | otherwise = comparing Remote.cost a b
- stallDetection :: Remote -> Annex (Maybe StallDetection)
- stallDetection r = maybe globalcfg (pure . Just) remotecfg
-   where
-       globalcfg = annexStallDetection <$> Annex.getGitConfig
-       remotecfg = remoteAnnexStallDetection $ Remote.gitconfig r
 +
 +bwLimit :: RemoteGitConfig -> Annex (Maybe BwRate)
 +bwLimit gc = maybe globalcfg (pure . Just) remotecfg
 +  where
 +      globalcfg = annexBwLimit <$> Annex.getGitConfig
 +      remotecfg = remoteAnnexBwLimit gc
diff --cc CHANGELOG
index fd9f1d06ef355aa0f9dd17d3b96d850ab8fdf0d6,9589632065711e0a223e57c5fc7a4f8a548d7a12..15e94fdc643ae54b355a0b39181ad897341097ed
+++ b/CHANGELOG
@@@ -1,9 -1,12 +1,14 @@@
  git-annex (8.20210904) UNRELEASED; urgency=medium
  
 +  * Added annex.bwlimit and remote.name.annex-bwlimit config that works
 +    for git remotes and many but not all special remotes.
+   * Bug fix: Git configs such as annex.verify were incorrectly overriding
+     per-remote git configs such as remote.name.annex-verify.
+     (Reversion in version 4.20130323)
    * borg: Avoid trying to extract xattrs, ACLS, and bsdflags when
      retrieving from a borg repository.
+   * Resume where it left off when copying a file to/from a local git remote
+     was interrupted.
  
   -- Joey Hess <id@joeyh.name>  Fri, 03 Sep 2021 12:02:55 -0400
  
index 64585cdffc5a89a79e04bc2895b42ab9776cd0f7,5c94743e891e28726a3e5225d063d42fa5980e1a..fca052da4e65f5d15712dbe6f5434ab0167eb106
@@@ -123,8 -123,6 +123,7 @@@ data GitConfig = GitConfi
        , annexRetry :: Maybe Integer
        , annexForwardRetry :: Maybe Integer
        , annexRetryDelay :: Maybe Seconds
-       , annexStallDetection :: Maybe StallDetection
 +      , annexBwLimit :: Maybe BwRate
        , annexAllowedUrlSchemes :: S.Set Scheme
        , annexAllowedIPAddresses :: String
        , annexAllowUnverifiedDownloads :: Bool
@@@ -218,12 -216,6 +217,9 @@@ extractGitConfig configsource r = GitCo
        , annexForwardRetry = getmayberead (annexConfig "forward-retry")
        , annexRetryDelay = Seconds
                <$> getmayberead (annexConfig "retrydelay")
-       , annexStallDetection =
-               either (const Nothing) Just . parseStallDetection
-                       =<< getmaybe (annexConfig "stalldetection")
 +      , annexBwLimit =
 +              either (const Nothing) Just . parseBwRate
 +                      =<< getmaybe (annexConfig "bwlimit")
        , annexAllowedUrlSchemes = S.fromList $ map mkScheme $
                maybe ["http", "https", "ftp"] words $
                        getmaybe (annexConfig "security.allowed-url-schemes")