summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpikomonde <32364823+pikomonde@users.noreply.github.com>2024-03-21 02:04:35 +0700
committerStefan Haller <stefan@haller-berlin.de>2024-04-12 08:33:47 +0200
commitde1c4957040c8f6176f05cc8c7b7e79b588071e0 (patch)
treeac213c16f006e8f329eb668380773a8b111164e2
parentfccfbf1f639d32569b142ae50bc1920a389b41ef (diff)
rename sha to hash 8, update some log and comment
-rw-r--r--pkg/commands/git_commands/reflog_commit_loader.go2
-rw-r--r--pkg/commands/models/commit.go2
-rw-r--r--pkg/gui/controllers/helpers/repos_helper.go2
-rw-r--r--pkg/gui/types/context.go2
-rw-r--r--pkg/utils/rebase_todo.go4
-rw-r--r--pkg/utils/rebase_todo_test.go16
6 files changed, 14 insertions, 14 deletions
diff --git a/pkg/commands/git_commands/reflog_commit_loader.go b/pkg/commands/git_commands/reflog_commit_loader.go
index 35120311f..721bb99e7 100644
--- a/pkg/commands/git_commands/reflog_commit_loader.go
+++ b/pkg/commands/git_commands/reflog_commit_loader.go
@@ -45,7 +45,7 @@ func (self *ReflogCommitLoader) GetReflogCommits(lastReflogCommit *models.Commit
}
// note that the unix timestamp here is the timestamp of the COMMIT, not the reflog entry itself,
- // so two consecutive reflog entries may have both the same SHA and therefore same timestamp.
+ // so two consecutive reflog entries may have both the same hash and therefore same timestamp.
// We use the reflog message to disambiguate, and fingers crossed that we never see the same of those
// twice in a row. Reason being that it would mean we'd be erroneously exiting early.
if lastReflogCommit != nil && self.sameReflogCommit(commit, lastReflogCommit) {
diff --git a/pkg/commands/models/commit.go b/pkg/commands/models/commit.go
index a6b4af0ba..64b89db8f 100644
--- a/pkg/commands/models/commit.go
+++ b/pkg/commands/models/commit.go
@@ -54,7 +54,7 @@ type Commit struct {
UnixTimestamp int64
Divergence Divergence // set to DivergenceNone unless we are showing the divergence view
- // SHAs of parent commits (will be multiple if it's a merge commit)
+ // Hashes of parent commits (will be multiple if it's a merge commit)
Parents []string
}
diff --git a/pkg/gui/controllers/helpers/repos_helper.go b/pkg/gui/controllers/helpers/repos_helper.go
index c2c177078..22883510a 100644
--- a/pkg/gui/controllers/helpers/repos_helper.go
+++ b/pkg/gui/controllers/helpers/repos_helper.go
@@ -62,7 +62,7 @@ func (self *ReposHelper) getCurrentBranch(path string) string {
// is a branch
branchDisplay = strings.TrimPrefix(content, refsPrefix)
} else {
- // detached HEAD state, displaying short SHA
+ // detached HEAD state, displaying short hash
branchDisplay = utils.ShortHash(content)
}
return branchDisplay, nil
diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go
index bb57375f9..63c759eb6 100644
--- a/pkg/gui/types/context.go
+++ b/pkg/gui/types/context.go
@@ -245,7 +245,7 @@ type IListPanelState interface {
}
type ListItem interface {
- // ID is a SHA when the item is a commit, a filename when the item is a file, 'stash@{4}' when it's a stash entry, 'my_branch' when it's a branch
+ // ID is a hash when the item is a commit, a filename when the item is a file, 'stash@{4}' when it's a stash entry, 'my_branch' when it's a branch
ID() string
// Description is something we would show in a message e.g. '123as14: push blah' for a commit
diff --git a/pkg/utils/rebase_todo.go b/pkg/utils/rebase_todo.go
index 6062d6785..c3186a04a 100644
--- a/pkg/utils/rebase_todo.go
+++ b/pkg/utils/rebase_todo.go
@@ -244,12 +244,12 @@ func moveFixupCommitDown(todos []todo.Todo, originalSha string, fixupSha string)
originalShaCount := lo.CountBy(todos, isOriginal)
if originalShaCount != 1 {
- return nil, fmt.Errorf("Expected exactly one original SHA, found %d", originalShaCount)
+ return nil, fmt.Errorf("Expected exactly one original hash, found %d", originalShaCount)
}
fixupShaCount := lo.CountBy(todos, isFixup)
if fixupShaCount != 1 {
- return nil, fmt.Errorf("Expected exactly one fixup SHA, found %d", fixupShaCount)
+ return nil, fmt.Errorf("Expected exactly one fixup hash, found %d", fixupShaCount)
}
_, fixupIndex, _ := lo.FindIndexOf(todos, isFixup)
diff --git a/pkg/utils/rebase_todo_test.go b/pkg/utils/rebase_todo_test.go
index c75d6d786..9e7e6ca97 100644
--- a/pkg/utils/rebase_todo_test.go
+++ b/pkg/utils/rebase_todo_test.go
@@ -301,7 +301,7 @@ func TestRebaseCommands_moveFixupCommitDown(t *testing.T) {
expectedErr: nil,
},
{
- name: "More original SHAs than expected",
+ name: "More original hashes than expected",
todos: []todo.Todo{
{Command: todo.Pick, Commit: "original"},
{Command: todo.Pick, Commit: "original"},
@@ -310,10 +310,10 @@ func TestRebaseCommands_moveFixupCommitDown(t *testing.T) {
originalHash: "original",
fixupHash: "fixup",
expectedTodos: nil,
- expectedErr: errors.New("Expected exactly one original SHA, found 2"),
+ expectedErr: errors.New("Expected exactly one original hash, found 2"),
},
{
- name: "More fixup SHAs than expected",
+ name: "More fixup hashes than expected",
todos: []todo.Todo{
{Command: todo.Pick, Commit: "original"},
{Command: todo.Pick, Commit: "fixup"},
@@ -322,27 +322,27 @@ func TestRebaseCommands_moveFixupCommitDown(t *testing.T) {
originalHash: "original",
fixupHash: "fixup",
expectedTodos: nil,
- expectedErr: errors.New("Expected exactly one fixup SHA, found 2"),
+ expectedErr: errors.New("Expected exactly one fixup hash, found 2"),
},
{
- name: "No fixup SHAs found",
+ name: "No fixup hashes found",
todos: []todo.Todo{
{Command: todo.Pick, Commit: "original"},
},
originalHash: "original",
fixupHash: "fixup",
expectedTodos: nil,
- expectedErr: errors.New("Expected exactly one fixup SHA, found 0"),
+ expectedErr: errors.New("Expected exactly one fixup hash, found 0"),
},
{
- name: "No original SHAs found",
+ name: "No original hashes found",
todos: []todo.Todo{
{Command: todo.Pick, Commit: "fixup"},
},
originalHash: "original",
fixupHash: "fixup",
expectedTodos: nil,
- expectedErr: errors.New("Expected exactly one original SHA, found 0"),
+ expectedErr: errors.New("Expected exactly one original hash, found 0"),
},
}