mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-09 13:47:11 +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
|
// we must ensure that we have at least two commits after the selected one
|
||||||
if len(commits) <= index+2 {
|
if len(commits) <= index+2 {
|
||||||
// assuming they aren't picking the bottom commit
|
// 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"))
|
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) {
|
func (c *GitCommand) GenerateGenericRebaseTodo(commits []*Commit, index int, action string) (string, error) {
|
||||||
if len(commits) <= index+1 {
|
if len(commits) <= index+1 {
|
||||||
// assuming they aren't picking the bottom commit
|
// 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("CannotRebaseOntoFirstCommit"))
|
||||||
return "", errors.New("You cannot interactive rebase onto the first commit")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
todo := ""
|
todo := ""
|
||||||
|
@ -123,7 +123,7 @@ func (c *CommitListBuilder) getRebasingCommits() ([]*commands.Commit, error) {
|
|||||||
return commits, nil
|
return commits, nil
|
||||||
}
|
}
|
||||||
splitLine := strings.Split(line, " ")
|
splitLine := strings.Split(line, " ")
|
||||||
commits = append([]*commands.Commit{&commands.Commit{
|
commits = append([]*commands.Commit{{
|
||||||
Sha: splitLine[1][0:7],
|
Sha: splitLine[1][0:7],
|
||||||
Name: strings.Join(splitLine[2:], " "),
|
Name: strings.Join(splitLine[2:], " "),
|
||||||
Status: "rebasing",
|
Status: "rebasing",
|
||||||
|
@ -299,12 +299,11 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
|||||||
Other: "revert commit", // TODO: i18n
|
Other: "revert commit", // TODO: i18n
|
||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "OnlyRenameTopCommit",
|
ID: "OnlyRenameTopCommit",
|
||||||
Other: "Can only rename topmost commit",
|
Other: "Can only rename topmost commit from within lazygit. Use shift+R instead",
|
||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "renameCommit",
|
ID: "renameCommit",
|
||||||
Other: "rename commit",
|
Other: "rename commit",
|
||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
|
|
||||||
ID: "deleteCommit",
|
ID: "deleteCommit",
|
||||||
Other: "delete commit", // TODO: other languages
|
Other: "delete commit", // TODO: other languages
|
||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
@ -586,6 +585,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "CherryPick",
|
ID: "CherryPick",
|
||||||
Other: "Cherry-Pick",
|
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