add copy count
This commit is contained in:
parent
80fdfdb72b
commit
ef92bd2b0b
1 changed files with 10 additions and 5 deletions
|
@ -12,7 +12,6 @@ import Control.Monad.State (liftIO)
|
|||
import qualified Annex
|
||||
import LocationLog
|
||||
import Command
|
||||
import Content
|
||||
import Messages
|
||||
import UUID
|
||||
import Types
|
||||
|
@ -33,9 +32,15 @@ perform :: Key -> CommandPerform
|
|||
perform key = do
|
||||
g <- Annex.gitRepo
|
||||
uuids <- liftIO $ keyLocations g key
|
||||
pp <- prettyPrintUUIDs uuids
|
||||
showLongNote $ pp
|
||||
showProgress
|
||||
let num = length uuids
|
||||
showNote $ show num ++ " " ++ copiesplural num
|
||||
if null $ uuids
|
||||
then return Nothing
|
||||
else return $ Just $ return True
|
||||
else do
|
||||
pp <- prettyPrintUUIDs uuids
|
||||
showLongNote $ pp
|
||||
showProgress
|
||||
return $ Just $ return True
|
||||
where
|
||||
copiesplural 1 = "copy"
|
||||
copiesplural _ = "copies"
|
||||
|
|
Loading…
Reference in a new issue