2014-04-17 22:41:24 +00:00
|
|
|
{- git-annex command
|
|
|
|
-
|
2015-01-21 16:50:09 +00:00
|
|
|
- Copyright 2014 Joey Hess <id@joeyh.name>
|
2014-04-17 22:41:24 +00:00
|
|
|
-
|
|
|
|
- Licensed under the GNU GPL version 3 or higher.
|
|
|
|
-}
|
|
|
|
|
|
|
|
module Command.FindRef where
|
|
|
|
|
2015-07-11 00:38:11 +00:00
|
|
|
import Common.Annex
|
2014-04-17 22:41:24 +00:00
|
|
|
import Command
|
|
|
|
import qualified Command.Find as Find
|
|
|
|
|
2015-07-08 16:33:27 +00:00
|
|
|
cmd :: Command
|
2015-07-11 00:38:11 +00:00
|
|
|
cmd = withGlobalOptions nonWorkTreeMatchingOptions $ Find.mkCommand $
|
2015-07-08 19:08:02 +00:00
|
|
|
command "findref" SectionPlumbing
|
2015-07-08 16:33:27 +00:00
|
|
|
"lists files in a git ref"
|
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
|
|
|
|
seek o = Find.start o `withFilesInRefs` Find.findThese o
|