forked from filipg/gonito
fix update a submission when using git-annex
This commit is contained in:
parent
85c9ad6646
commit
92c0927dca
@ -130,15 +130,15 @@ updateRepo repoId chan = do
|
|||||||
repo <- runDB $ get404 repoId
|
repo <- runDB $ get404 repoId
|
||||||
repoDir <- getRepoDir repoId
|
repoDir <- getRepoDir repoId
|
||||||
let branch = repoBranch repo
|
let branch = repoBranch repo
|
||||||
(exitCode, _) <- runProgram (Just repoDir) gitPath ["fetch",
|
exitCode <- runWithChannel chan $ do
|
||||||
|
runProg (Just repoDir) gitPath ["fetch",
|
||||||
"origin",
|
"origin",
|
||||||
T.unpack branch,
|
T.unpack branch,
|
||||||
"--progress"] chan
|
"--progress"]
|
||||||
case exitCode of
|
runProg (Just repoDir) gitPath ["reset",
|
||||||
ExitSuccess -> do
|
|
||||||
(exitCode, _) <- runProgram (Just repoDir) gitPath ["reset",
|
|
||||||
"--hard",
|
"--hard",
|
||||||
"FETCH_HEAD"] chan
|
"FETCH_HEAD"]
|
||||||
|
getStuffUsingGitAnnex repoDir (repoGitAnnexRemote repo)
|
||||||
case exitCode of
|
case exitCode of
|
||||||
ExitSuccess -> do
|
ExitSuccess -> do
|
||||||
maybeHeadCommit <- getHeadCommit repoDir chan
|
maybeHeadCommit <- getHeadCommit repoDir chan
|
||||||
@ -148,7 +148,6 @@ updateRepo repoId chan = do
|
|||||||
return True
|
return True
|
||||||
Nothing -> return False
|
Nothing -> return False
|
||||||
_ -> return False
|
_ -> return False
|
||||||
_ -> return False
|
|
||||||
|
|
||||||
getHeadCommit :: FilePath -> Channel -> Handler (Maybe SHA1)
|
getHeadCommit :: FilePath -> Channel -> Handler (Maybe SHA1)
|
||||||
getHeadCommit repoDir chan = do
|
getHeadCommit repoDir chan = do
|
||||||
|
Loading…
Reference in New Issue
Block a user