1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-07 22:02:56 +03:00

rename sha to hash

This commit is contained in:
pikomonde
2024-03-21 00:44:56 +07:00
committed by Stefan Haller
parent 84333eebc3
commit e6ef1642fa
32 changed files with 470 additions and 470 deletions

View File

@@ -212,7 +212,7 @@ func (self *ChangeTodoActionsInstruction) run(common *common.Common) error {
return handleInteractiveRebase(common, func(path string) error {
changes := lo.Map(self.Changes, func(c ChangeTodoAction, _ int) utils.TodoChange {
return utils.TodoChange{
Sha: c.Sha,
Hash: c.Hash,
OldAction: todo.Pick,
NewAction: c.NewAction,
}
@@ -222,18 +222,18 @@ func (self *ChangeTodoActionsInstruction) run(common *common.Common) error {
})
}
// Takes the sha of some commit, and the sha of a fixup commit that was created
// 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"
type MoveFixupCommitDownInstruction struct {
OriginalSha string
FixupSha string
OriginalHash string
FixupHash string
}
func NewMoveFixupCommitDownInstruction(originalSha string, fixupSha string) Instruction {
return &MoveFixupCommitDownInstruction{
OriginalSha: originalSha,
FixupSha: fixupSha,
OriginalHash: originalSha,
FixupHash: fixupSha,
}
}
@@ -247,17 +247,17 @@ func (self *MoveFixupCommitDownInstruction) SerializedInstructions() string {
func (self *MoveFixupCommitDownInstruction) run(common *common.Common) error {
return handleInteractiveRebase(common, func(path string) error {
return utils.MoveFixupCommitDown(path, self.OriginalSha, self.FixupSha, getCommentChar())
return utils.MoveFixupCommitDown(path, self.OriginalHash, self.FixupHash, getCommentChar())
})
}
type MoveTodosUpInstruction struct {
Shas []string
Hashes []string
}
func NewMoveTodosUpInstruction(shas []string) Instruction {
func NewMoveTodosUpInstruction(hashes []string) Instruction {
return &MoveTodosUpInstruction{
Shas: shas,
Hashes: hashes,
}
}
@@ -270,9 +270,9 @@ func (self *MoveTodosUpInstruction) SerializedInstructions() string {
}
func (self *MoveTodosUpInstruction) run(common *common.Common) error {
todosToMove := lo.Map(self.Shas, func(sha string, _ int) utils.Todo {
todosToMove := lo.Map(self.Hashes, func(hash string, _ int) utils.Todo {
return utils.Todo{
Sha: sha,
Hash: hash,
Action: todo.Pick,
}
})
@@ -283,12 +283,12 @@ func (self *MoveTodosUpInstruction) run(common *common.Common) error {
}
type MoveTodosDownInstruction struct {
Shas []string
Hashes []string
}
func NewMoveTodosDownInstruction(shas []string) Instruction {
func NewMoveTodosDownInstruction(hashes []string) Instruction {
return &MoveTodosDownInstruction{
Shas: shas,
Hashes: hashes,
}
}
@@ -301,9 +301,9 @@ func (self *MoveTodosDownInstruction) SerializedInstructions() string {
}
func (self *MoveTodosDownInstruction) run(common *common.Common) error {
todosToMove := lo.Map(self.Shas, func(sha string, _ int) utils.Todo {
todosToMove := lo.Map(self.Hashes, func(hash string, _ int) utils.Todo {
return utils.Todo{
Sha: sha,
Hash: hash,
Action: todo.Pick,
}
})