1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

better logic for checking if we're rebasing

This commit is contained in:
Jesse Duffield 2020-02-25 22:00:20 +11:00
parent 02c497fad6
commit e6a8dc0bcf

View File

@ -136,14 +136,6 @@ func lazygitTitle() string {
}
func (gui *Gui) updateWorkTreeState() error {
merging, err := gui.GitCommand.IsInMergeState()
if err != nil {
return err
}
if merging {
gui.State.WorkingTreeState = "merging"
return nil
}
rebaseMode, err := gui.GitCommand.RebaseMode()
if err != nil {
return err
@ -152,6 +144,14 @@ func (gui *Gui) updateWorkTreeState() error {
gui.State.WorkingTreeState = "rebasing"
return nil
}
merging, err := gui.GitCommand.IsInMergeState()
if err != nil {
return err
}
if merging {
gui.State.WorkingTreeState = "merging"
return nil
}
gui.State.WorkingTreeState = "normal"
return nil
}