From f3d5639f40e415afbf73fcdbfe9f529c8f456cfe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Jul 2013 16:47:34 -0400 Subject: dropunused, addunused: Complain when asked to operate on a number that does not correspond to any unused key. --- Command/Unused.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Command/Unused.hs') diff --git a/Command/Unused.hs b/Command/Unused.hs index 989faa9a3..fd6cf6575 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -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 -- cgit v1.2.3