findref: New command, like find but shows files in a specified git ref.

This commit is contained in:
Joey Hess 2014-04-17 18:41:24 -04:00
parent e880d0d22c
commit ecc3dc8433
7 changed files with 53 additions and 2 deletions

20
Command/FindRef.hs Normal file
View file

@ -0,0 +1,20 @@
{- git-annex command
-
- Copyright 2014 Joey Hess <joey@kitenet.net>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.FindRef where
import Command
import qualified Command.Find as Find
def :: [Command]
def = [Find.mkCommand $ command "findref" paramRef seek SectionPlumbing
"lists files in a git ref"]
seek :: CommandSeek
seek refs = do
format <- Find.getFormat
Find.start format `withFilesInRefs` refs