mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-17 12:06:38 +02:00
Refresh BRANCHES and COMMITS after (un)staging upstream
This commit is contained in:
parent
c4b958e3fd
commit
e114b5b5e8
@ -116,6 +116,15 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error
|
|||||||
if err := self.git.Branch.UnsetUpstream(selectedBranch.Name); err != nil {
|
if err := self.git.Branch.UnsetUpstream(selectedBranch.Name); err != nil {
|
||||||
return self.c.Error(err)
|
return self.c.Error(err)
|
||||||
}
|
}
|
||||||
|
if err := self.c.Refresh(types.RefreshOptions{
|
||||||
|
Mode: types.SYNC,
|
||||||
|
Scope: []types.RefreshableView{
|
||||||
|
types.BRANCHES,
|
||||||
|
types.COMMITS,
|
||||||
|
},
|
||||||
|
}); err != nil {
|
||||||
|
return self.c.Error(err)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
Key: 'u',
|
Key: 'u',
|
||||||
@ -132,6 +141,15 @@ func (self *BranchesController) setUpstream(selectedBranch *models.Branch) error
|
|||||||
if err := self.git.Branch.SetUpstream(upstreamRemote, upstreamBranch, selectedBranch.Name); err != nil {
|
if err := self.git.Branch.SetUpstream(upstreamRemote, upstreamBranch, selectedBranch.Name); err != nil {
|
||||||
return self.c.Error(err)
|
return self.c.Error(err)
|
||||||
}
|
}
|
||||||
|
if err := self.c.Refresh(types.RefreshOptions{
|
||||||
|
Mode: types.SYNC,
|
||||||
|
Scope: []types.RefreshableView{
|
||||||
|
types.BRANCHES,
|
||||||
|
types.COMMITS,
|
||||||
|
},
|
||||||
|
}); err != nil {
|
||||||
|
return self.c.Error(err)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user