clarify default values when no path is specified
Much of the code to handle this was unnecessary, as git ls-files is used, and defaults to returning all files of the desired type.
This commit is contained in:
parent
2a67721d51
commit
23686cc63d
5 changed files with 6 additions and 17 deletions
13
Command.hs
13
Command.hs
|
@ -174,19 +174,6 @@ backendPairs a files = do
|
|||
pairs <- Backend.chooseBackends files
|
||||
return $ map a pairs
|
||||
|
||||
{- Default to acting on all files matching the seek action if
|
||||
- none are specified. -}
|
||||
withAll :: (a -> CommandSeek) -> a -> CommandSeek
|
||||
withAll w a [] = do
|
||||
g <- Annex.gitRepo
|
||||
w a [Git.workTree g]
|
||||
withAll w a p = w a p
|
||||
|
||||
{- Provides a default parameter to act on if none is specified. -}
|
||||
withDefault :: String-> (a -> CommandSeek) -> (a -> CommandSeek)
|
||||
withDefault d w a [] = w a [d]
|
||||
withDefault _ w a p = w a p
|
||||
|
||||
{- Filter out files from the state directory, and those matching the
|
||||
- exclude glob pattern, if it was specified. -}
|
||||
filterFiles :: [FilePath] -> Annex [FilePath]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue