diff options
Diffstat (limited to 'pkg/gui/modes/cherrypicking/cherry_picking.go')
-rw-r--r-- | pkg/gui/modes/cherrypicking/cherry_picking.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/gui/modes/cherrypicking/cherry_picking.go b/pkg/gui/modes/cherrypicking/cherry_picking.go new file mode 100644 index 000000000..705735510 --- /dev/null +++ b/pkg/gui/modes/cherrypicking/cherry_picking.go @@ -0,0 +1,23 @@ +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 +} |