From: Joey Hess Date: Mon, 4 Dec 2023 15:12:54 +0000 (-0400) Subject: improve message about 1 copy X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~29^2~138 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fd0b5105731b17899d79cade82436320ab85cb56;p=git-annex.git 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 --- 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) ++