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

24 lines
565 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
}
2022-01-30 20:03:08 +11:00
func New() *CherryPicking {
return &CherryPicking{
2021-06-05 15:08:36 +10:00
CherryPickedCommits: make([]*models.Commit, 0),
ContextKey: "",
}
}
func (m *CherryPicking) Active() bool {
return len(m.CherryPickedCommits) > 0
}