fix updating non-master branches

This commit is contained in:
Filip Gralinski 2016-02-11 22:25:07 +01:00
parent f06e104f3d
commit c09aacddfd

View File

@ -94,7 +94,11 @@ updateRepo :: Key Repo -> Channel -> Handler Bool
updateRepo repoId chan = do
repo <- runDB $ get404 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
ExitSuccess -> do
(exitCode, _) <- runProgram (Just repoDir) gitPath ["reset",