From fd0b5105731b17899d79cade82436320ab85cb56 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Dec 2023 11:12:54 -0400 Subject: [PATCH] improve message about 1 copy "Could only verify the existence of 0 out of 1 necessary copy" does not sound right, but neither does it with "copies". Kept the "1" rather than "only" or such since numcopies is mentioned. Sponsored-by: Brock Spratlen on Patreon --- Annex/NumCopies.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Annex/NumCopies.hs b/Annex/NumCopies.hs index 1d8722a3d4..69b1943d87 100644 --- a/Annex/NumCopies.hs +++ b/Annex/NumCopies.hs @@ -282,9 +282,11 @@ notEnoughCopies key neednum needmin have skip bad nolocmsg lockunsupported = do showNote "unsafe" if length have < fromNumCopies neednum then showLongNote $ UnquotedString $ - "Could only verify the existence of " ++ - show (length have) ++ " out of " ++ show (fromNumCopies neednum) ++ - " necessary " ++ pluralCopies (fromNumCopies neednum) + if fromNumCopies neednum == 1 + then "Could not verify the existence of the 1 necessary copy." + else "Could only verify the existence of " ++ + show (length have) ++ " out of " ++ show (fromNumCopies neednum) ++ + " necessary " ++ pluralCopies (fromNumCopies neednum) ++ "." else do showLongNote $ UnquotedString $ "Unable to lock down " ++ show (fromMinCopies needmin) ++ " " ++ pluralCopies (fromMinCopies needmin) ++