documentation/warning message update for future feature

This commit is contained in:
Joey Hess 2011-09-23 18:04:38 -04:00
parent 6dc23b889e
commit d75da353b9
4 changed files with 15 additions and 24 deletions

View file

@ -112,21 +112,8 @@ staleBadMsg t = unlines $
unusedMsg :: [(Int, Key)] -> String
unusedMsg u = unusedMsg' u
["Some annexed data is no longer used by any files in the current branch:"]
[dropMsg Nothing,
"Please be cautious -- are you sure that another branch, or another",
"repository does not still use this data?"]
remoteUnusedMsg :: Remote.Remote Annex -> [(Int, Key)] -> String
remoteUnusedMsg r u = unusedMsg' u
["Some annexed data on " ++ name ++
" is not used by any files in the current branch:"]
[dropMsg $ Just r,
"Please be cautious -- Are you sure that the remote repository",
"does not use this data? Or that it's not used by another branch?"]
where
name = Remote.name r
["Some annexed data is no longer used by any files:"]
[dropMsg Nothing]
unusedMsg' :: [(Int, Key)] -> [String] -> [String] -> String
unusedMsg' u header trailer = unlines $
header ++
@ -134,6 +121,13 @@ unusedMsg' u header trailer = unlines $
["(To see where data was previously used, try: git log --stat -S'KEY')"] ++
trailer
remoteUnusedMsg :: Remote.Remote Annex -> [(Int, Key)] -> String
remoteUnusedMsg r u = unusedMsg' u
["Some annexed data on " ++ name ++ " is not used by any files:"]
[dropMsg $ Just r]
where
name = Remote.name r
dropMsg :: Maybe (Remote.Remote Annex) -> String
dropMsg Nothing = dropMsg' ""
dropMsg (Just r) = dropMsg' $ " --from " ++ Remote.name r