2014-04-17 18:41:24 -04:00
|
|
|
{- git-annex command
|
|
|
|
-
|
2018-12-09 14:10:37 -04:00
|
|
|
- Copyright 2014-2018 Joey Hess <id@joeyh.name>
|
2014-04-17 18:41:24 -04:00
|
|
|
-
|
2019-03-13 15:48:14 -04:00
|
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
2014-04-17 18:41:24 -04:00
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.FindRef where
|
|
|
|
|
|
|
|
import Command
|
|
|
|
import qualified Command.Find as Find
|
2017-08-31 12:47:08 -04:00
|
|
|
import qualified Git
|
2014-04-17 18:41:24 -04:00
|
|
|
|
2015-07-08 12:33:27 -04:00
|
|
|
cmd :: Command
|
2022-06-29 13:28:08 -04:00
|
|
|
cmd = withAnnexOptions [annexedMatchingOptions] $ Find.mkCommand $
|
2015-07-08 15:08:02 -04:00
|
|
|
command "findref" SectionPlumbing
|
2018-12-09 14:10:37 -04:00
|
|
|
"lists files in a git ref (deprecated)"
|
2015-07-10 20:38:11 -04:00
|
|
|
paramRef (seek <$$> Find.optParser)
|
2014-04-17 18:41:24 -04:00
|
|
|
|
2015-07-10 20:38:11 -04:00
|
|
|
seek :: Find.FindOptions -> CommandSeek
|
2018-12-09 14:10:37 -04:00
|
|
|
seek o = Find.seek o'
|
|
|
|
where
|
|
|
|
o' = o
|
|
|
|
{ Find.keyOptions = Just $ WantBranchKeys $
|
2021-08-10 20:45:02 -04:00
|
|
|
map (Git.Ref . encodeBS) (Find.findThese o)
|
2018-12-09 14:10:37 -04:00
|
|
|
, Find.findThese = []
|
|
|
|
}
|