1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-27 22:38:09 +02:00
This commit is contained in:
Jesse Duffield
2021-12-07 21:59:36 +11:00
parent 157dd309f7
commit b4c078d565
48 changed files with 437 additions and 493 deletions

View File

@@ -3,12 +3,11 @@ package gui
import (
"fmt"
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/gui/style"
)
func (gui *Gui) resetToRef(ref string, strength string, span string, options oscommands.RunCommandOptions) error {
if err := gui.GitCommand.WithSpan(span).ResetToCommit(ref, strength, options); err != nil {
func (gui *Gui) resetToRef(ref string, strength string, span string, envVars []string) error {
if err := gui.GitCommand.WithSpan(span).ResetToCommit(ref, strength, envVars); err != nil {
return gui.surfaceError(err)
}
@@ -39,7 +38,7 @@ func (gui *Gui) createResetMenu(ref string) error {
style.FgRed.Sprintf("reset --%s %s", strength, ref),
},
onPress: func() error {
return gui.resetToRef(ref, strength, "Reset", oscommands.RunCommandOptions{})
return gui.resetToRef(ref, strength, "Reset", []string{})
},
}
}