+8
-3
@@ -333,13 +333,17 @@ gitCommitAll logger repoPath = do
|
||||
-- | Pull from the configured remote, rebasing onto the tracked upstream branch.
|
||||
gitPull :: Logger -> RepoConfig -> IO (ExitCode, Text, Text)
|
||||
gitPull logger repo =
|
||||
loggedGit logger (rcPath repo)
|
||||
loggedGit
|
||||
logger
|
||||
(rcPath repo)
|
||||
["pull", "--rebase", T.unpack (rcRemote repo)]
|
||||
|
||||
-- | Push to the configured remote and branch.
|
||||
gitPush :: Logger -> RepoConfig -> IO (ExitCode, Text, Text)
|
||||
gitPush logger repo =
|
||||
loggedGit logger (rcPath repo)
|
||||
loggedGit
|
||||
logger
|
||||
(rcPath repo)
|
||||
["push", T.unpack (rcRemote repo), T.unpack (rcBranch repo)]
|
||||
|
||||
-- | Run a git command and log the invocation and exit code.
|
||||
@@ -348,7 +352,8 @@ loggedGit logger repoPath args = do
|
||||
logInfo logger ("RUN: git -C " <> T.pack repoPath <> " " <> T.intercalate " " (map T.pack args))
|
||||
result@(code, _, err) <- runGitIn repoPath args
|
||||
let msg = "EXIT " <> T.pack (show code)
|
||||
details = if code /= ExitSuccess && not (T.null err)
|
||||
details =
|
||||
if code /= ExitSuccess && not (T.null err)
|
||||
then ": " <> T.strip err
|
||||
else ""
|
||||
logInfo logger (msg <> details)
|
||||
|
||||
Reference in New Issue
Block a user