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
|
|
|
|
|
|
|
|
import Command
|
|
|
|
import qualified Command.Find as Find
|
|
|
|
|
2014-10-14 18:20:10 +00:00
|
|
|
cmd :: [Command]
|
2015-02-06 21:08:14 +00:00
|
|
|
cmd = [withOptions nonWorkTreeMatchingOptions $ Find.mkCommand $
|
|
|
|
command "findref" paramRef seek SectionPlumbing
|
|
|
|
"lists files in a git ref"]
|
2014-04-17 22:41:24 +00:00
|
|
|
|
|
|
|
seek :: CommandSeek
|
|
|
|
seek refs = do
|
|
|
|
format <- Find.getFormat
|
|
|
|
Find.start format `withFilesInRefs` refs
|