b223988e22
--backend is no longer a global option, and is only accepted by commands that actually need it. Three commands that used to support backend but don't any longer are watch, webapp, and assistant. It would be possible to make them support it, but I doubt anyone used the option with these. And in the case of webapp and assistant, the option was handled inconsistently, only taking affect when the command is run with an existing git-annex repo, not when it creates a new one. Also, renamed GlobalOption etc to AnnexOption. Because there are many options of this type that are not actually global (any more) and get added to commands that need them. Sponsored-by: Kevin Mueller on Patreon
27 lines
637 B
Haskell
27 lines
637 B
Haskell
{- git-annex command
|
|
-
|
|
- Copyright 2014-2018 Joey Hess <id@joeyh.name>
|
|
-
|
|
- Licensed under the GNU AGPL version 3 or higher.
|
|
-}
|
|
|
|
module Command.FindRef where
|
|
|
|
import Command
|
|
import qualified Command.Find as Find
|
|
import qualified Git
|
|
|
|
cmd :: Command
|
|
cmd = withAnnexOptions [annexedMatchingOptions] $ Find.mkCommand $
|
|
command "findref" SectionPlumbing
|
|
"lists files in a git ref (deprecated)"
|
|
paramRef (seek <$$> Find.optParser)
|
|
|
|
seek :: Find.FindOptions -> CommandSeek
|
|
seek o = Find.seek o'
|
|
where
|
|
o' = o
|
|
{ Find.keyOptions = Just $ WantBranchKeys $
|
|
map (Git.Ref . encodeBS) (Find.findThese o)
|
|
, Find.findThese = []
|
|
}
|