dropunused, addunused: Allow "all" instead of a range to act on all unused data.
This commit is contained in:
parent
446dd74f56
commit
0d0e21ea57
3 changed files with 13 additions and 3 deletions
|
@ -332,11 +332,13 @@ withUnusedMaps a params = do
|
|||
unused <- readUnusedLog ""
|
||||
unusedbad <- readUnusedLog "bad"
|
||||
unusedtmp <- readUnusedLog "tmp"
|
||||
let m = unused `M.union` unusedbad `M.union` unusedtmp
|
||||
return $ map (a $ UnusedMaps unused unusedbad unusedtmp) $
|
||||
concatMap unusedSpec params
|
||||
concatMap (unusedSpec m) params
|
||||
|
||||
unusedSpec :: String -> [Int]
|
||||
unusedSpec spec
|
||||
unusedSpec :: UnusedMap -> String -> [Int]
|
||||
unusedSpec m spec
|
||||
| spec == "all" = [fst (M.findMin m)..fst (M.findMax m)]
|
||||
| "-" `isInfixOf` spec = range $ separate (== '-') spec
|
||||
| otherwise = maybe badspec (: []) (readish spec)
|
||||
where
|
||||
|
|
7
debian/changelog
vendored
7
debian/changelog
vendored
|
@ -1,3 +1,10 @@
|
|||
git-annex (5.20131119) UNRELEASED; urgency=low
|
||||
|
||||
* dropunused, addunused: Allow "all" instead of a range to
|
||||
act on all unused data.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 18 Nov 2013 17:09:21 -0400
|
||||
|
||||
git-annex (5.20131118) unstable; urgency=low
|
||||
|
||||
* Direct mode repositories now have core.bare=true set, to prevent
|
||||
|
|
|
@ -509,6 +509,7 @@ subdirectories).
|
|||
`git annex unused`
|
||||
|
||||
You can also specify ranges of numbers, such as "1-1000".
|
||||
Or, specify "all" to drop all unused data.
|
||||
|
||||
To drop the data from a remote, specify `--from.`
|
||||
|
||||
|
|
Loading…
Reference in a new issue