904be4e6be
No deprecation warning at run time, just one on the man page. One thing findref remains able to do that find cannot is to run in a bare repo. Find was made to refuse to run in a bare repo because it seemed confusing for it to not list any files ever in that situation. It would be better for find --branch to work in a bare repo but not without --branch but I don't currently have a way to do that. Probably a better solution would be to make git-annex in a bare repo default to --branch master or something like that instead of --all. This commit was sponsored by Denis Dzyubenko on Patreon.
27 lines
624 B
Haskell
27 lines
624 B
Haskell
{- git-annex command
|
|
-
|
|
- Copyright 2014-2018 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 [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 (Find.findThese o)
|
|
, Find.findThese = []
|
|
}
|