forked from filipg/gonito
fix updating non-master branches
This commit is contained in:
parent
f06e104f3d
commit
c09aacddfd
@ -94,7 +94,11 @@ updateRepo :: Key Repo -> Channel -> Handler Bool
|
|||||||
updateRepo repoId chan = do
|
updateRepo repoId chan = do
|
||||||
repo <- runDB $ get404 repoId
|
repo <- runDB $ get404 repoId
|
||||||
repoDir <- getRepoDir repoId
|
repoDir <- getRepoDir repoId
|
||||||
(exitCode, _) <- runProgram (Just repoDir) gitPath ["fetch", "--progress"] chan
|
let branch = repoBranch repo
|
||||||
|
(exitCode, _) <- runProgram (Just repoDir) gitPath ["fetch",
|
||||||
|
"origin",
|
||||||
|
T.unpack branch,
|
||||||
|
"--progress"] chan
|
||||||
case exitCode of
|
case exitCode of
|
||||||
ExitSuccess -> do
|
ExitSuccess -> do
|
||||||
(exitCode, _) <- runProgram (Just repoDir) gitPath ["reset",
|
(exitCode, _) <- runProgram (Just repoDir) gitPath ["reset",
|
||||||
|
Loading…
Reference in New Issue
Block a user