packages feed

git-all 1.4.0 → 1.5.0

raw patch · 2 files changed

+17/−13 lines, 2 files

Files

Main.hs view
@@ -6,7 +6,7 @@  module Main where --- git-all.hs, version 1.0 (2012-08-06)+-- git-all.hs -- -- by John Wiegley <johnw@newartisans.com> --@@ -20,6 +20,7 @@ import           Control.Monad.Trans.State import qualified Data.List as L import           Data.Maybe+import           Data.Monoid #if MIN_VERSION_shelly(1, 0, 0) import           Data.Text as T #else@@ -39,10 +40,10 @@ default (T.Text)  version :: String-version = "1.3.0"+version = "1.5.0"  copyright :: String-copyright = "2012"+copyright = "2012-2013"  gitAllSummary :: String gitAllSummary = "git-all v" ++ version ++ ", (C) John Wiegley " ++ copyright@@ -67,18 +68,16 @@                       &= help "Report progress verbosely"     , debug     = def &= name "D"                       &= help "Report debug information"-    , arguments = def &= args &= typ "fetch | status" } &=-    summary gitAllSummary &=-    program "git-all" &=-    help "Fetch or get status of all Git repos under the given directories"+    , arguments = def &= args &= typ "fetch | status"+                      &= opt (T.unpack "status") }+    &= summary gitAllSummary+    &= program "git-all"+    &= help "Fetch or get status of all Git repos under the given directories"  main :: IO () main = do   -- process command-line options-  mainArgs <- getArgs-  opts     <- withArgs (if L.null mainArgs then ["status"] else mainArgs)-                       (cmdArgs gitAll)-+  opts <- cmdArgs gitAll   _ <- GHC.Conc.setNumCapabilities $ case jobs opts of 0 -> 4; x -> x    when (verbose opts) $ updateGlobalLogger "git-all" (setLevel INFO)@@ -136,7 +135,7 @@       mapM_ (gitPushOrPull dir url (pulls opts)) =<< gitLocalBranches dir       gitStatus dir (untracked opts) -    unknown  -> putStrM $ T.concat [ "Unknown command: ", T.pack unknown, "\n" ]+    command -> gitCommand dir (T.pack command)  -- Git command wrappers @@ -164,6 +163,11 @@       return $ T.unlines $ L.filter (not . (=~ pat) . unpack) (T.lines out)    putStrM $ topTen "FETCH" (dirAsFile dir) output "=="++gitCommand :: FilePath -> Text -> IOState ()+gitCommand dir command = do+  output <- git dir command []+  putStrM $ topTen ("CMD[" <> command <> "]") (dirAsFile dir) output "=="  type CommitId = Text type BranchInfo = (CommitId, Text)
git-all.cabal view
@@ -1,6 +1,6 @@ Name: git-all -Version:  1.4.0+Version:  1.5.0 Synopsis: Determine which Git repositories need actions to be taken  Description: A utility for determining which Git repositories need actions to be