got rid of almost all 'return ()'
This commit is contained in:
parent
9c7b3dce9e
commit
045b051ec1
9 changed files with 30 additions and 50 deletions
|
@ -16,6 +16,7 @@ import qualified Data.Map as M
|
|||
import System.IO
|
||||
import System.Cmd.Utils
|
||||
import Data.String.Utils
|
||||
import Monad (unless)
|
||||
|
||||
import qualified GitRepo as Git
|
||||
|
||||
|
@ -52,9 +53,7 @@ run repo queue = do
|
|||
- Complicated by commandline length limits. -}
|
||||
runAction :: Git.Repo -> Action -> [FilePath] -> IO ()
|
||||
runAction repo action files = do
|
||||
if (null files)
|
||||
then return ()
|
||||
else runxargs
|
||||
unless (null files) runxargs
|
||||
where
|
||||
runxargs = pOpen WriteToPipe "xargs"
|
||||
(["-0", "git", subcommand action] ++ (params action))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue