dropunused, addunused: Complain when asked to operate on a number that does not correspond to any unused key.

This commit is contained in:
Joey Hess 2013-07-08 16:47:34 -04:00
parent 1412fe0049
commit 207c9f3c4a
3 changed files with 5 additions and 1 deletions

View file

@ -351,7 +351,7 @@ startUnused message unused badunused tmpunused maps n = search
, (unusedTmpMap maps, tmpunused)
]
where
search [] = stop
search [] = error $ show n ++ " not valid (run git annex unused for list)"
search ((m, a):rest) =
case M.lookup n m of
Nothing -> search rest