git-annex/Command/FindRef.hs

22 lines
517 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
2015-07-11 00:38:11 +00:00
import Common.Annex
import Command
import qualified Command.Find as Find
cmd :: Command
2015-07-11 00:38:11 +00:00
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 = Find.start o `withFilesInRefs` Find.findThese o