git-annex/Command/FindRef.hs

23 lines
565 B
Haskell
Raw Normal View History

{- git-annex command
-
- Copyright 2014 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.FindRef where
import Command
import qualified Command.Find as Find
2017-08-31 16:47:08 +00:00
import qualified Git
cmd :: Command
cmd = withGlobalOptions [nonWorkTreeMatchingOptions] $ Find.mkCommand $
command "findref" SectionPlumbing
"lists files in a git ref"
2015-07-11 00:38:11 +00:00
paramRef (seek <$$> Find.optParser)
2015-07-11 00:38:11 +00:00
seek :: Find.FindOptions -> CommandSeek
seek o = (commandAction . uncurry (Find.start o))
`withFilesInRefs` (map Git.Ref $ Find.findThese o)