tweaks
This commit is contained in:
parent
16e7178f20
commit
abdacf58ed
8 changed files with 26 additions and 41 deletions
|
@ -68,15 +68,15 @@ create = do
|
|||
return ()
|
||||
|
||||
{- Returns the ref of the branch, creating it first if necessary. -}
|
||||
getBranch :: Annex (Git.Ref)
|
||||
getBranch = maybe (hasOrigin >>= go >>= use) (return) =<< branchsha
|
||||
getBranch :: Annex Git.Ref
|
||||
getBranch = maybe (hasOrigin >>= go >>= use) return =<< branchsha
|
||||
where
|
||||
go True = do
|
||||
inRepo $ Git.Command.run "branch"
|
||||
[Param $ show name, Param $ show originname]
|
||||
fromMaybe (error $ "failed to create " ++ show name)
|
||||
<$> branchsha
|
||||
go False = withIndex' True $ do
|
||||
go False = withIndex' True $
|
||||
inRepo $ Git.Branch.commit "branch created" fullname []
|
||||
use sha = do
|
||||
setIndexSha sha
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue