diff options
author | Joey Hess <joey@kitenet.net> | 2011-01-26 16:20:28 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-01-26 16:20:28 -0400 |
commit | 7f6af79232eee685daf58e72737c5284f80cf482 (patch) | |
tree | e3ec0e7612845e056df355c6841ee9a58e603d52 /Trust.hs | |
parent | 7b2da21ab7bc51785203a69cc05ab811a8629ecb (diff) |
trust setting improvements
Diffstat (limited to 'Trust.hs')
-rw-r--r-- | Trust.hs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -73,6 +73,8 @@ trustMapParse s = M.fromList $ map pair $ filter (not . null) $ lines s {- Changes the trust level for a uuid in the trustLog, and commits it. -} trustSet :: UUID -> TrustLevel -> Annex () trustSet uuid level = do + when (null uuid) $ + error "unknown UUID; cannot modify trust level" m <- trustMap when (M.lookup uuid m /= Just level) $ do let m' = M.insert uuid level m |