avoid unnecessary log changes when re-adding the same url
This commit is contained in:
parent
5bf07b3b5c
commit
0fada43808
1 changed files with 6 additions and 4 deletions
|
@ -47,6 +47,8 @@ getUrls key = go $ urlLog key : oldurlLogs key
|
|||
{- Records a change in an url for a key. -}
|
||||
setUrl :: Key -> URLString -> LogStatus -> Annex ()
|
||||
setUrl key url status = do
|
||||
us <- getUrls key
|
||||
unless (status == InfoPresent && url `elem` us) $ do
|
||||
addLog (urlLog key) =<< logNow status url
|
||||
|
||||
-- update location log to indicate that the web has the key, or not
|
||||
|
|
Loading…
Reference in a new issue