refactoring

filterBranch should be reusable for copy-branch command.

Changed LogVariety to differentiate between LocationLog and UrlLog;
only location logs contain uuids and need to be filtered by uuid,
while url logs do not. This does not change current behavior,
but it will let filterBranch be reused without filtering url logs
incorrectly.
This commit is contained in:
Joey Hess 2021-05-13 14:43:25 -04:00
parent 13a8706cda
commit 4ff8a1ae2b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 55 additions and 64 deletions

View file

@ -678,7 +678,7 @@ performTransitionsLocked jl ts neednewlocalbranch transitionedrefs = do
trustmap <- calcTrustMap <$> getStaged trustLog
remoteconfigmap <- calcRemoteConfigMap <$> getStaged remoteLog
-- partially apply, improves performance
let changers' = map (\c -> c config trustmap remoteconfigmap) changers
let changers' = map (\c -> c trustmap remoteconfigmap config) changers
(fs, cleanup) <- branchFiles
forM_ fs $ \f -> do
content <- getStaged f