Documentation ¶
Index ¶
- Constants
- func Handle(common *common.Common)
- func InDaemonMode() bool
- func ToEnvVars(instruction Instruction) []string
- func TodoLinesToString(todoLines []TodoLine) string
- type ChangeTodoAction
- type ChangeTodoActionsInstruction
- type CherryPickCommitsInstruction
- type DaemonKind
- type ExitImmediatelyInstruction
- type InsertBreakInstruction
- type Instruction
- func NewChangeTodoActionsInstruction(changes []ChangeTodoAction) Instruction
- func NewCherryPickCommitsInstruction(commits []*models.Commit) Instruction
- func NewExitImmediatelyInstruction() Instruction
- func NewInsertBreakInstruction() Instruction
- func NewMoveFixupCommitDownInstruction(originalHash string, fixupHash string) Instruction
- func NewMoveTodosDownInstruction(hashes []string) Instruction
- func NewMoveTodosUpInstruction(hashes []string) Instruction
- func NewRemoveUpdateRefsForCopiedBranchInstruction() Instruction
- func NewWriteRebaseTodoInstruction(todosFileContent []byte) Instruction
- type MoveFixupCommitDownInstruction
- type MoveTodosDownInstruction
- type MoveTodosUpInstruction
- type RemoveUpdateRefsForCopiedBranchInstruction
- type TodoLine
- type WriteRebaseTodoInstruction
Constants ¶
View Source
const ( DaemonKindEnvKey string = "LAZYGIT_DAEMON_KIND" // Contains json-encoded arguments to the daemon DaemonInstructionEnvKey string = "LAZYGIT_DAEMON_INSTRUCTION" )
Variables ¶
This section is empty.
Functions ¶
func InDaemonMode ¶
func InDaemonMode() bool
func ToEnvVars ¶ added in v0.38.0
func ToEnvVars(instruction Instruction) []string
func TodoLinesToString ¶ added in v0.38.0
Types ¶
type ChangeTodoAction ¶ added in v0.38.0
type ChangeTodoAction struct { Hash string NewAction todo.TodoCommand }
type ChangeTodoActionsInstruction ¶ added in v0.38.0
type ChangeTodoActionsInstruction struct {
Changes []ChangeTodoAction
}
func (*ChangeTodoActionsInstruction) Kind ¶ added in v0.38.0
func (self *ChangeTodoActionsInstruction) Kind() DaemonKind
func (*ChangeTodoActionsInstruction) SerializedInstructions ¶ added in v0.38.0
func (self *ChangeTodoActionsInstruction) SerializedInstructions() string
type CherryPickCommitsInstruction ¶ added in v0.38.0
type CherryPickCommitsInstruction struct {
Todo string
}
func (*CherryPickCommitsInstruction) Kind ¶ added in v0.38.0
func (self *CherryPickCommitsInstruction) Kind() DaemonKind
func (*CherryPickCommitsInstruction) SerializedInstructions ¶ added in v0.38.0
func (self *CherryPickCommitsInstruction) SerializedInstructions() string
type DaemonKind ¶
type DaemonKind int
const ( // for when we fail to parse the daemon kind DaemonKindUnknown DaemonKind = iota DaemonKindExitImmediately DaemonKindRemoveUpdateRefsForCopiedBranch DaemonKindCherryPick DaemonKindMoveTodosUp DaemonKindMoveTodosDown DaemonKindInsertBreak DaemonKindChangeTodoActions DaemonKindMoveFixupCommitDown DaemonKindWriteRebaseTodo )
type ExitImmediatelyInstruction ¶ added in v0.38.0
type ExitImmediatelyInstruction struct{}
func (*ExitImmediatelyInstruction) Kind ¶ added in v0.38.0
func (self *ExitImmediatelyInstruction) Kind() DaemonKind
func (*ExitImmediatelyInstruction) SerializedInstructions ¶ added in v0.38.0
func (self *ExitImmediatelyInstruction) SerializedInstructions() string
type InsertBreakInstruction ¶ added in v0.38.0
type InsertBreakInstruction struct{}
func (*InsertBreakInstruction) Kind ¶ added in v0.38.0
func (self *InsertBreakInstruction) Kind() DaemonKind
func (*InsertBreakInstruction) SerializedInstructions ¶ added in v0.38.0
func (self *InsertBreakInstruction) SerializedInstructions() string
type Instruction ¶ added in v0.38.0
type Instruction interface { Kind() DaemonKind SerializedInstructions() string // contains filtered or unexported methods }
An Instruction is a command to be run by lazygit in daemon mode. It is serialized to json and passed to lazygit via environment variables
func NewChangeTodoActionsInstruction ¶ added in v0.38.0
func NewChangeTodoActionsInstruction(changes []ChangeTodoAction) Instruction
func NewCherryPickCommitsInstruction ¶ added in v0.38.0
func NewCherryPickCommitsInstruction(commits []*models.Commit) Instruction
func NewExitImmediatelyInstruction ¶ added in v0.38.0
func NewExitImmediatelyInstruction() Instruction
func NewInsertBreakInstruction ¶ added in v0.38.0
func NewInsertBreakInstruction() Instruction
func NewMoveFixupCommitDownInstruction ¶ added in v0.38.0
func NewMoveFixupCommitDownInstruction(originalHash string, fixupHash string) Instruction
func NewMoveTodosDownInstruction ¶ added in v0.41.0
func NewMoveTodosDownInstruction(hashes []string) Instruction
func NewMoveTodosUpInstruction ¶ added in v0.41.0
func NewMoveTodosUpInstruction(hashes []string) Instruction
func NewRemoveUpdateRefsForCopiedBranchInstruction ¶ added in v0.42.0
func NewRemoveUpdateRefsForCopiedBranchInstruction() Instruction
func NewWriteRebaseTodoInstruction ¶ added in v0.42.0
func NewWriteRebaseTodoInstruction(todosFileContent []byte) Instruction
type MoveFixupCommitDownInstruction ¶ added in v0.38.0
Takes the hash of some commit, and the hash of a fixup commit that was created at the end of the branch, then moves the fixup commit down to right after the original commit, changing its type to "fixup"
func (*MoveFixupCommitDownInstruction) Kind ¶ added in v0.38.0
func (self *MoveFixupCommitDownInstruction) Kind() DaemonKind
func (*MoveFixupCommitDownInstruction) SerializedInstructions ¶ added in v0.38.0
func (self *MoveFixupCommitDownInstruction) SerializedInstructions() string
type MoveTodosDownInstruction ¶ added in v0.41.0
type MoveTodosDownInstruction struct {
Hashes []string
}
func (*MoveTodosDownInstruction) Kind ¶ added in v0.41.0
func (self *MoveTodosDownInstruction) Kind() DaemonKind
func (*MoveTodosDownInstruction) SerializedInstructions ¶ added in v0.41.0
func (self *MoveTodosDownInstruction) SerializedInstructions() string
type MoveTodosUpInstruction ¶ added in v0.41.0
type MoveTodosUpInstruction struct {
Hashes []string
}
func (*MoveTodosUpInstruction) Kind ¶ added in v0.41.0
func (self *MoveTodosUpInstruction) Kind() DaemonKind
func (*MoveTodosUpInstruction) SerializedInstructions ¶ added in v0.41.0
func (self *MoveTodosUpInstruction) SerializedInstructions() string
type RemoveUpdateRefsForCopiedBranchInstruction ¶ added in v0.42.0
type RemoveUpdateRefsForCopiedBranchInstruction struct{}
func (*RemoveUpdateRefsForCopiedBranchInstruction) Kind ¶ added in v0.42.0
func (self *RemoveUpdateRefsForCopiedBranchInstruction) Kind() DaemonKind
func (*RemoveUpdateRefsForCopiedBranchInstruction) SerializedInstructions ¶ added in v0.42.0
func (self *RemoveUpdateRefsForCopiedBranchInstruction) SerializedInstructions() string
type WriteRebaseTodoInstruction ¶ added in v0.42.0
type WriteRebaseTodoInstruction struct {
TodosFileContent []byte
}
func (*WriteRebaseTodoInstruction) Kind ¶ added in v0.42.0
func (self *WriteRebaseTodoInstruction) Kind() DaemonKind
func (*WriteRebaseTodoInstruction) SerializedInstructions ¶ added in v0.42.0
func (self *WriteRebaseTodoInstruction) SerializedInstructions() string
Click to show internal directories.
Click to hide internal directories.