diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-09 19:03:21 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-09 19:03:24 -0400 |
commit | ea0f914261e4747de75339952c2d47374c5a7803 (patch) | |
tree | 4af3a12da54d8f40878f1f8d563b8abbd5d0516f /Command/Unused.hs | |
parent | 7a5aff2c121f4ecbc173e939b0cf7b2975d18438 (diff) |
wip
Current status:
* building again, but several commands are commented out
* still need to implement global options, file matching options, etc
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r-- | Command/Unused.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index e6d5f7c71..4649485c2 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -57,13 +57,13 @@ start = do !refspec <- maybe cfgrefspec (either error id . parseRefSpec) <$> Annex.getField (optionName refSpecOption) from <- Annex.getField (optionName unusedFromOption) - let (name, action) = case from of + let (name, perform) = case from of Nothing -> (".", checkUnused refspec) Just "." -> (".", checkUnused refspec) Just "here" -> (".", checkUnused refspec) Just n -> (n, checkRemoteUnused n refspec) showStart "unused" name - next action + next perform checkUnused :: RefSpec -> CommandPerform checkUnused refspec = chain 0 @@ -127,11 +127,11 @@ unusedMsg u = unusedMsg' u ["Some annexed data is no longer used by any files:"] [dropMsg Nothing] unusedMsg' :: [(Int, Key)] -> [String] -> [String] -> String -unusedMsg' u header trailer = unlines $ - header ++ +unusedMsg' u mheader mtrailer = unlines $ + mheader ++ table u ++ ["(To see where data was previously used, try: git log --stat -S'KEY')"] ++ - trailer + mtrailer remoteUnusedMsg :: Remote -> [(Int, Key)] -> String remoteUnusedMsg r u = unusedMsg' u |