oldkeys --revision-range
Sponsored-by: Brett Eisenberg on Patreon
This commit is contained in:
parent
cf8b30c914
commit
5489c2cdd6
2 changed files with 19 additions and 1 deletions
|
@ -29,11 +29,16 @@ cmd = noCommit $ withAnnexOptions [annexedMatchingOptions] $
|
||||||
|
|
||||||
data OldKeysOptions = OldKeysOptions
|
data OldKeysOptions = OldKeysOptions
|
||||||
{ fileOptions :: CmdParams
|
{ fileOptions :: CmdParams
|
||||||
|
, revisionRange :: Maybe String
|
||||||
}
|
}
|
||||||
|
|
||||||
optParser :: CmdParamsDesc -> Parser OldKeysOptions
|
optParser :: CmdParamsDesc -> Parser OldKeysOptions
|
||||||
optParser desc = OldKeysOptions
|
optParser desc = OldKeysOptions
|
||||||
<$> cmdParams desc
|
<$> cmdParams desc
|
||||||
|
<*> optional (strOption
|
||||||
|
( long "revision-range" <> metavar "RANGE"
|
||||||
|
<> help "limit to a revision range"
|
||||||
|
))
|
||||||
|
|
||||||
seek :: OldKeysOptions -> CommandSeek
|
seek :: OldKeysOptions -> CommandSeek
|
||||||
seek o = do
|
seek o = do
|
||||||
|
@ -71,7 +76,11 @@ seek o = do
|
||||||
, Param "--raw"
|
, Param "--raw"
|
||||||
-- Avoid outputting anything except for the raw diff.
|
-- Avoid outputting anything except for the raw diff.
|
||||||
, Param "--pretty="
|
, Param "--pretty="
|
||||||
] ++ map File (fileOptions o)
|
]
|
||||||
|
++ case revisionRange o of
|
||||||
|
Nothing -> []
|
||||||
|
Just rr -> [Param rr]
|
||||||
|
++ map File (fileOptions o)
|
||||||
|
|
||||||
isfilemode m = case toTreeItemType m of
|
isfilemode m = case toTreeItemType m of
|
||||||
Just TreeFile -> True
|
Just TreeFile -> True
|
||||||
|
|
|
@ -23,6 +23,15 @@ repository.
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
|
* --revision-range=value
|
||||||
|
|
||||||
|
Only list old keys used in the specified range of revisions.
|
||||||
|
This works the same as the revision range option of `git log`.
|
||||||
|
See gitrevisions(7) for documentation about the format of this option.
|
||||||
|
|
||||||
|
For example, to list only keys used since the tag v1.0, use
|
||||||
|
`--revision-range=v1.0..HEAD`
|
||||||
|
|
||||||
* Also the [[git-annex-common-options]](1) can be used.
|
* Also the [[git-annex-common-options]](1) can be used.
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue