diff options
author | Joey Hess <joey@kitenet.net> | 2014-03-26 13:28:26 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-03-26 13:28:26 -0400 |
commit | c1c600e2182f7ae59fa930c757e2f462fddde6e8 (patch) | |
tree | 99becdac617d294ca21d2f1a2451f13c27a9c0c5 /Annex/Branch | |
parent | b6cd57847c8e0d07a1c9d21ee92fa19354513ec7 (diff) |
forget --drop-dead: Avoid removing the dead remote from the trust.log, so that if git remotes for it still exist anywhere, git annex info will still know it's dead and not show it.
Diffstat (limited to 'Annex/Branch')
-rw-r--r-- | Annex/Branch/Transitions.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Annex/Branch/Transitions.hs b/Annex/Branch/Transitions.hs index 42c61d96a..5c2c14548 100644 --- a/Annex/Branch/Transitions.hs +++ b/Annex/Branch/Transitions.hs @@ -32,8 +32,12 @@ getTransitionCalculator ForgetDeadRemotes = Just dropDead dropDead :: FilePath -> String -> TrustMap -> FileTransition dropDead f content trustmap = case getLogVariety f of - Just UUIDBasedLog -> ChangeFile $ - UUIDBased.showLog id $ dropDeadFromUUIDBasedLog trustmap $ UUIDBased.parseLog Just content + Just UUIDBasedLog + -- Don't remove the dead repo from the trust log, + -- because git remotes may still exist, and they need + -- to still know it's dead. + | f == trustLog -> PreserveFile + | otherwise -> ChangeFile $ UUIDBased.showLog id $ dropDeadFromUUIDBasedLog trustmap $ UUIDBased.parseLog Just content Just NewUUIDBasedLog -> ChangeFile $ UUIDBased.showLogNew id $ dropDeadFromUUIDBasedLog trustmap $ UUIDBased.parseLogNew Just content Just (PresenceLog _) -> |