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