1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-22 05:29:44 +02:00
lazygit/pkg/gui/modes/cherrypicking/cherry_picking.go

24 lines
563 B
Go
Raw Normal View History

2021-06-05 15:08:36 +10:00
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
}