mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-03 13:21:56 +02:00
cleanup
This commit is contained in:
parent
19a3ac603d
commit
23c51ba708
@ -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 := ""
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user