split out Git/Command.hs
This commit is contained in:
parent
02f1bd2bf4
commit
ef28b3fef7
22 changed files with 125 additions and 100 deletions
|
@ -12,6 +12,7 @@ import qualified Data.ByteString.Lazy.Char8 as B
|
|||
import Common.Annex
|
||||
import Command
|
||||
import qualified Git
|
||||
import qualified Git.Command
|
||||
import qualified Annex
|
||||
import qualified Command.Unannex
|
||||
import Init
|
||||
|
@ -29,7 +30,7 @@ check = do
|
|||
"cannot uninit when the " ++ show b ++ " branch is checked out"
|
||||
where
|
||||
current_branch = Git.Ref . head . lines . B.unpack <$> revhead
|
||||
revhead = inRepo $ Git.pipeRead
|
||||
revhead = inRepo $ Git.Command.pipeRead
|
||||
[Params "rev-parse --abbrev-ref HEAD"]
|
||||
|
||||
seek :: [CommandSeek]
|
||||
|
@ -57,5 +58,6 @@ cleanup = do
|
|||
liftIO $ removeDirectoryRecursive annexdir
|
||||
-- avoid normal shutdown
|
||||
saveState
|
||||
inRepo $ Git.run "branch" [Param "-D", Param $ show Annex.Branch.name]
|
||||
inRepo $ Git.Command.run "branch"
|
||||
[Param "-D", Param $ show Annex.Branch.name]
|
||||
liftIO exitSuccess
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue