mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
start breaking up git struct
This commit is contained in:
@ -18,7 +18,7 @@ const (
|
||||
func (gui *Gui) handleCreateRebaseOptionsMenu() error {
|
||||
options := []string{REBASE_OPTION_CONTINUE, REBASE_OPTION_ABORT}
|
||||
|
||||
if gui.GitCommand.WorkingTreeState() == enums.REBASE_MODE_REBASING {
|
||||
if gui.GitCommand.Status.WorkingTreeState() == enums.REBASE_MODE_REBASING {
|
||||
options = append(options, REBASE_OPTION_SKIP)
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ func (gui *Gui) handleCreateRebaseOptionsMenu() error {
|
||||
}
|
||||
|
||||
var title string
|
||||
if gui.GitCommand.WorkingTreeState() == enums.REBASE_MODE_MERGING {
|
||||
if gui.GitCommand.Status.WorkingTreeState() == enums.REBASE_MODE_MERGING {
|
||||
title = gui.Tr.MergeOptionsTitle
|
||||
} else {
|
||||
title = gui.Tr.RebaseOptionsTitle
|
||||
@ -45,7 +45,7 @@ func (gui *Gui) handleCreateRebaseOptionsMenu() error {
|
||||
}
|
||||
|
||||
func (gui *Gui) genericMergeCommand(command string) error {
|
||||
status := gui.GitCommand.WorkingTreeState()
|
||||
status := gui.GitCommand.Status.WorkingTreeState()
|
||||
|
||||
if status != enums.REBASE_MODE_MERGING && status != enums.REBASE_MODE_REBASING {
|
||||
return gui.createErrorPanel(gui.Tr.NotMergingOrRebasing)
|
||||
@ -71,7 +71,7 @@ func (gui *Gui) genericMergeCommand(command string) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
result := gui.GitCommand.GenericMergeOrRebaseAction(commandType, command)
|
||||
result := gui.GitCommand.Rebase.GenericMergeOrRebaseAction(commandType, command)
|
||||
if err := gui.handleGenericMergeCommandResult(result); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -142,7 +142,7 @@ func (gui *Gui) abortMergeOrRebaseWithConfirm() error {
|
||||
}
|
||||
|
||||
func (gui *Gui) workingTreeStateNoun() string {
|
||||
workingTreeState := gui.GitCommand.WorkingTreeState()
|
||||
workingTreeState := gui.GitCommand.Status.WorkingTreeState()
|
||||
switch workingTreeState {
|
||||
case enums.REBASE_MODE_NONE:
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user