diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-17 18:41:24 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-17 18:41:24 -0400 |
commit | e23a4eb3c9e9a6bc39a5a59fe45300e8fdfb0916 (patch) | |
tree | d3a75a3f65edb6f8a02b7ce54553e3a9960fcc34 /Command/FindRef.hs | |
parent | e9b6c350b15a93d82affadfabca18b3e95840cb1 (diff) |
findref: New command, like find but shows files in a specified git ref.
Diffstat (limited to 'Command/FindRef.hs')
-rw-r--r-- | Command/FindRef.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Command/FindRef.hs b/Command/FindRef.hs new file mode 100644 index 000000000..26007f7c0 --- /dev/null +++ b/Command/FindRef.hs @@ -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 |