summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local>2019-02-24 17:59:47 +1100
committerJesse Duffield Duffield <jesseduffieldduffield@Jesses-MacBook-Pro-3.local>2019-02-24 18:34:18 +1100
commit23c51ba70841ef779e7fcef9fd2a5c717835e168 (patch)
treeabe58ff1ae969ac414b268a2328b36b926fbc94e
parent19a3ac603decd6a7647099d3024ad29f082f641e (diff)
cleanup
-rw-r--r--pkg/commands/git.go4
-rw-r--r--pkg/git/commit_list_builder.go2
-rw-r--r--pkg/i18n/english.go6
3 files changed, 6 insertions, 6 deletions
diff --git a/pkg/commands/git.go b/pkg/commands/git.go
index 8d62a1e63..6d488b149 100644
--- a/pkg/commands/git.go
+++ b/pkg/commands/git.go
@@ -591,7 +591,6 @@ func (c *GitCommand) MoveCommitDown(commits []*Commit, index int) error {
// we must ensure that we have at least two commits after the selected one
if len(commits) <= index+2 {
// assuming they aren't picking the bottom commit
- // TODO: support more than say 30 commits and ensure this logic is correct, and i18n
return errors.New(c.Tr.SLocalize("NoRoom"))
}
@@ -672,8 +671,7 @@ func (c *GitCommand) SoftReset(baseSha string) error {
func (c *GitCommand) GenerateGenericRebaseTodo(commits []*Commit, index int, action string) (string, error) {
if len(commits) <= index+1 {
// assuming they aren't picking the bottom commit
- // TODO: support more than say 30 commits and ensure this logic is correct, and i18n
- return "", errors.New("You cannot interactive rebase onto the first commit")
+ return "", errors.New(c.Tr.SLocalize("CannotRebaseOntoFirstCommit"))
}
todo := ""
diff --git a/pkg/git/commit_list_builder.go b/pkg/git/commit_list_builder.go
index 6ae6efeee..08a10fafc 100644
--- a/pkg/git/commit_list_builder.go
+++ b/pkg/git/commit_list_builder.go
@@ -123,7 +123,7 @@ func (c *CommitListBuilder) getRebasingCommits() ([]*commands.Commit, error) {
return commits, nil
}
splitLine := strings.Split(line, " ")
- commits = append([]*commands.Commit{&commands.Commit{
+ commits = append([]*commands.Commit{{
Sha: splitLine[1][0:7],
Name: strings.Join(splitLine[2:], " "),
Status: "rebasing",
diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go
index 626d6d4cc..74d9bfb7d 100644
--- a/pkg/i18n/english.go
+++ b/pkg/i18n/english.go
@@ -299,12 +299,11 @@ func addEnglish(i18nObject *i18n.Bundle) error {
Other: "revert commit", // TODO: i18n
}, &i18n.Message{
ID: "OnlyRenameTopCommit",
- Other: "Can only rename topmost commit",
+ Other: "Can only rename topmost commit from within lazygit. Use shift+R instead",
}, &i18n.Message{
ID: "renameCommit",
Other: "rename commit",
}, &i18n.Message{
-
ID: "deleteCommit",
Other: "delete commit", // TODO: other languages
}, &i18n.Message{
@@ -586,6 +585,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
}, &i18n.Message{
ID: "CherryPick",
Other: "Cherry-Pick",
+ }, &i18n.Message{
+ ID: "CannotRebaseOntoFirstCommit",
+ Other: "You cannot interactive rebase onto the first commit",
},
)
}