sync: When some remotes to sync with are specified, and --fast is too, pick the lowest cost of the specified remotes
Do not sync with a faster remote that was not specified. That old behavior was only documented in the changelog, and was certianly surprising. It also meant adding --fast made it slower..
This commit is contained in:
parent
3252c4ccca
commit
c05c4e549e
4 changed files with 9 additions and 3 deletions
|
@ -31,6 +31,9 @@ git-annex (8.20200331) UNRELEASED; urgency=medium
|
||||||
git-annex enableremote is passed readonly=true.
|
git-annex enableremote is passed readonly=true.
|
||||||
* Stop storing readonly=true in remote.log of external special remotes;
|
* Stop storing readonly=true in remote.log of external special remotes;
|
||||||
it is a local setting only.
|
it is a local setting only.
|
||||||
|
* sync: When some remotes to sync with are specified, and --fast is too,
|
||||||
|
pick the lowest cost of the specified remotes, do not sync with a
|
||||||
|
faster remote that was not specified.
|
||||||
|
|
||||||
-- Joey Hess <id@joeyh.name> Mon, 30 Mar 2020 15:58:34 -0400
|
-- Joey Hess <id@joeyh.name> Mon, 30 Mar 2020 15:58:34 -0400
|
||||||
|
|
||||||
|
|
|
@ -291,10 +291,8 @@ syncRemotes ps = do
|
||||||
|
|
||||||
syncRemotes' :: [String] -> [Remote] -> Annex [Remote]
|
syncRemotes' :: [String] -> [Remote] -> Annex [Remote]
|
||||||
syncRemotes' ps available =
|
syncRemotes' ps available =
|
||||||
ifM (Annex.getState Annex.fast) ( nub <$> pickfast , wanted )
|
ifM (Annex.getState Annex.fast) ( fastest <$> wanted , wanted )
|
||||||
where
|
where
|
||||||
pickfast = (++) <$> listed <*> (filterM good (fastest available))
|
|
||||||
|
|
||||||
wanted
|
wanted
|
||||||
| null ps = filterM good (concat $ Remote.byCost available)
|
| null ps = filterM good (concat $ Remote.byCost available)
|
||||||
| otherwise = listed
|
| otherwise = listed
|
||||||
|
|
|
@ -22,3 +22,5 @@ I actually used `--fast` because I was annoyed by annex iterating over all files
|
||||||
### What version of git-annex are you using? On what operating system?
|
### What version of git-annex are you using? On what operating system?
|
||||||
|
|
||||||
8.20200330, Debian testing
|
8.20200330, Debian testing
|
||||||
|
|
||||||
|
> [[fixed|done]] --[[Joey]]
|
||||||
|
|
|
@ -46,6 +46,9 @@ received.
|
||||||
|
|
||||||
Only sync with the remotes with the lowest annex-cost value configured.
|
Only sync with the remotes with the lowest annex-cost value configured.
|
||||||
|
|
||||||
|
When a list of remotes (or remote groups) is provided, it picks from
|
||||||
|
amoung those, otherwise it picks from amoung all remotes.
|
||||||
|
|
||||||
* `--only-annex` `-a`, `--not-only-annex`
|
* `--only-annex` `-a`, `--not-only-annex`
|
||||||
|
|
||||||
Only sync the git-annex branch and annexed content with remotes,
|
Only sync the git-annex branch and annexed content with remotes,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue