split out Git/Command.hs

This commit is contained in:
Joey Hess 2011-12-14 15:56:11 -04:00
parent 02f1bd2bf4
commit ef28b3fef7
22 changed files with 125 additions and 100 deletions

View file

@ -9,6 +9,7 @@ module Upgrade.V2 where
import Common.Annex
import qualified Git
import qualified Git.Command
import qualified Git.Ref
import qualified Annex.Branch
import Logs.Location
@ -53,7 +54,7 @@ upgrade = do
showProgress
when e $ do
inRepo $ Git.run "rm" [Param "-r", Param "-f", Param "-q", File old]
inRepo $ Git.Command.run "rm" [Param "-r", Param "-f", Param "-q", File old]
unless bare $ inRepo gitAttributesUnWrite
showProgress
@ -104,7 +105,8 @@ push = do
Annex.Branch.update -- just in case
showAction "pushing new git-annex branch to origin"
showOutput
inRepo $ Git.run "push" [Param "origin", Param $ show Annex.Branch.name]
inRepo $ Git.Command.run "push"
[Param "origin", Param $ show Annex.Branch.name]
_ -> do
-- no origin exists, so just let the user
-- know about the new branch
@ -127,7 +129,7 @@ gitAttributesUnWrite repo = do
c <- readFileStrict attributes
liftIO $ viaTmp writeFile attributes $ unlines $
filter (`notElem` attrLines) $ lines c
Git.run "add" [File attributes] repo
Git.Command.run "add" [File attributes] repo
stateDir :: FilePath
stateDir = addTrailingPathSeparator ".git-annex"