Fix wrong sorting of remotes when using -J
It was sorting by uuid, rather than cost! Avoid future bugs of this kind by changing the Ord to primarily compare by cost, with uuid only used when the cost is the same. This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
178ab762eb
commit
1a02fc1159
4 changed files with 18 additions and 2 deletions
|
@ -279,4 +279,4 @@ pickRemote l a = go l =<< Annex.getState Annex.concurrency
|
|||
lessActiveFirst :: M.Map Remote Integer -> Remote -> Remote -> Ordering
|
||||
lessActiveFirst active a b
|
||||
| Remote.cost a == Remote.cost b = comparing (`M.lookup` active) a b
|
||||
| otherwise = compare a b
|
||||
| otherwise = comparing Remote.cost a b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue