1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/modes/cherrypicking/cherry_picking.go
Jesse Duffield 93bf691fd6 refactoring
2021-06-06 09:12:49 +10:00

24 lines
563 B
Go

package cherrypicking
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
)
type CherryPicking struct {
CherryPickedCommits []*models.Commit
// we only allow cherry picking from one context at a time, so you can't copy a commit from the local commits context and then also copy a commit in the reflog context
ContextKey string
}
func New() CherryPicking {
return CherryPicking{
CherryPickedCommits: make([]*models.Commit, 0),
ContextKey: "",
}
}
func (m *CherryPicking) Active() bool {
return len(m.CherryPickedCommits) > 0
}