53526136e8
This is groundwork for nested seek loops, eg seeking over all files and then performing commandActions on a list of remotes, which can be done concurrently. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
22 lines
565 B
Haskell
22 lines
565 B
Haskell
{- 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
|
|
import qualified Git
|
|
|
|
cmd :: Command
|
|
cmd = withGlobalOptions [nonWorkTreeMatchingOptions] $ Find.mkCommand $
|
|
command "findref" SectionPlumbing
|
|
"lists files in a git ref"
|
|
paramRef (seek <$$> Find.optParser)
|
|
|
|
seek :: Find.FindOptions -> CommandSeek
|
|
seek o = (commandAction . uncurry (Find.start o))
|
|
`withFilesInRefs` (map Git.Ref $ Find.findThese o)
|