sync, merge: Bug fix: Don't try to merge into master when in a bare repo.
This commit is contained in:
parent
6b4b2a6515
commit
a6a047192e
2 changed files with 8 additions and 4 deletions
|
@ -101,10 +101,13 @@ mergeLocal :: Git.Ref -> CommandStart
|
|||
mergeLocal branch = go =<< needmerge
|
||||
where
|
||||
syncbranch = syncBranch branch
|
||||
needmerge = do
|
||||
unlessM (inRepo $ Git.Ref.exists syncbranch) $
|
||||
inRepo $ updateBranch syncbranch
|
||||
inRepo $ Git.Branch.changed branch syncbranch
|
||||
needmerge = ifM isBareRepo
|
||||
( return False
|
||||
, do
|
||||
unlessM (inRepo $ Git.Ref.exists syncbranch) $
|
||||
inRepo $ updateBranch syncbranch
|
||||
inRepo $ Git.Branch.changed branch syncbranch
|
||||
)
|
||||
go False = stop
|
||||
go True = do
|
||||
showStart "merge" $ Git.Ref.describe syncbranch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue