1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-07 13:42:01 +02:00

Fix typos

This commit is contained in:
Nathan Baulch 2024-09-14 14:45:25 +10:00 committed by Jesse Duffield
parent ae459b2377
commit 508cdb40a8
23 changed files with 30 additions and 30 deletions

View File

@ -2,7 +2,7 @@
## The use-case ## The use-case
This topic deserves its own doc because there there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process: This topic deserves its own doc because there are a few touch points for it. We have a use-case for knowing when Lazygit is idle or busy because integration tests follow the following process:
1) press a key 1) press a key
2) wait until Lazygit is idle 2) wait until Lazygit is idle
3) run assertion / press another key 3) run assertion / press another key

View File

@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | Checkout | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | Checkout | Checkout the selected tag as a detached HEAD. |
| `` n `` | New tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | New tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. | | `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -180,7 +180,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | チェックアウト | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | チェックアウト | Checkout the selected tag as a detached HEAD. |
| `` n `` | タグを作成 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | タグを作成 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. | | `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | タグをpush | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | タグをpush | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -321,7 +321,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | 체크아웃 | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | 체크아웃 | Checkout the selected tag as a detached HEAD. |
| `` n `` | 태그를 생성 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | 태그를 생성 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. | | `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | 태그를 push | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | 태그를 push | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | Uitchecken | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | Uitchecken | Checkout the selected tag as a detached HEAD. |
| `` n `` | Creëer tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | Creëer tag | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. | | `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | Push tag | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -286,7 +286,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | Переключить | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | Переключить | Checkout the selected tag as a detached HEAD. |
| `` n `` | Создать тег | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | Создать тег | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | Delete | View delete options for local/remote tag. | | `` d `` | Delete | View delete options for local/remote tag. |
| `` P `` | Отправить тег | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | Отправить тег | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -282,7 +282,7 @@ If you would instead like to start an interactive rebase from the selected commi
| Key | Action | Info | | Key | Action | Info |
|-----|--------|-------------| |-----|--------|-------------|
| `` <space> `` | 檢出 | Checkout the selected tag tag as a detached HEAD. | | `` <space> `` | 檢出 | Checkout the selected tag as a detached HEAD. |
| `` n `` | 建立標籤 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. | | `` n `` | 建立標籤 | Create new tag from current commit. You'll be prompted to enter a tag name and optional description. |
| `` d `` | 刪除 | View delete options for local/remote tag. | | `` d `` | 刪除 | View delete options for local/remote tag. |
| `` P `` | 推送標籤 | Push the selected tag to a remote. You'll be prompted to select a remote. | | `` P `` | 推送標籤 | Push the selected tag to a remote. You'll be prompted to select a remote. |

View File

@ -122,7 +122,7 @@ func TestOSCommandFileType(t *testing.T) {
}, },
}, },
{ {
"nonExistant", "nonExistent",
func() {}, func() {},
func(output string) { func(output string) {
assert.EqualValues(t, "other", output) assert.EqualValues(t, "other", output)

View File

@ -131,7 +131,7 @@ func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool {
return false return false
} }
// By default, list contexts supporta range select // By default, list contexts supports range select
func (self *ListContextTrait) RangeSelectEnabled() bool { func (self *ListContextTrait) RangeSelectEnabled() bool {
return true return true
} }

View File

@ -664,7 +664,7 @@ func (self *FilesController) handleAmendCommitPress() error {
Title: self.c.Tr.AmendLastCommitTitle, Title: self.c.Tr.AmendLastCommitTitle,
Prompt: self.c.Tr.SureToAmend, Prompt: self.c.Tr.SureToAmend,
HandleConfirm: func() error { HandleConfirm: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
if len(self.c.Model().Commits) == 0 { if len(self.c.Model().Commits) == 0 {
return errors.New(self.c.Tr.NoCommitToAmend) return errors.New(self.c.Tr.NoCommitToAmend)
} }

View File

@ -75,7 +75,7 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions
return options.OnRefNotFound(ref) return options.OnRefNotFound(ref)
} }
if IsSwitchBranchUncommitedChangesError(err) { if IsSwitchBranchUncommittedChangesError(err) {
// offer to autostash changes // offer to autostash changes
self.c.OnUIThread(func() error { self.c.OnUIThread(func() error {
// (Before showing the prompt, render again to remove the inline status) // (Before showing the prompt, render again to remove the inline status)
@ -353,7 +353,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest
newBranchFunc = self.c.Git().Branch.NewWithoutTracking newBranchFunc = self.c.Git().Branch.NewWithoutTracking
} }
if err := newBranchFunc(newBranchName, from); err != nil { if err := newBranchFunc(newBranchName, from); err != nil {
if IsSwitchBranchUncommitedChangesError(err) { if IsSwitchBranchUncommittedChangesError(err) {
// offer to autostash changes // offer to autostash changes
self.c.Confirm(types.ConfirmOpts{ self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.AutoStashTitle, Title: self.c.Tr.AutoStashTitle,
@ -413,6 +413,6 @@ func (self *RefsHelper) ParseRemoteBranchName(fullBranchName string) (string, st
return remoteName, branchName, true return remoteName, branchName, true
} }
func IsSwitchBranchUncommitedChangesError(err error) bool { func IsSwitchBranchUncommittedChangesError(err error) bool {
return strings.Contains(err.Error(), "Please commit your changes or stash them before you switch branch") return strings.Contains(err.Error(), "Please commit your changes or stash them before you switch branch")
} }

View File

@ -422,7 +422,7 @@ func renderLayout(windows map[string]boxlayout.Dimensions) string {
return dimensionsA.X0 < dimensionsB.X0 return dimensionsA.X0 < dimensionsB.X0
}) })
// Uniquefy windows by dimensions (so perfectly overlapping windows are de-duped). This prevents getting 'fileshes' as a label where the files and branches windows overlap. // Uniquify windows by dimensions (so perfectly overlapping windows are de-duped). This prevents getting 'fileshes' as a label where the files and branches windows overlap.
// branches windows overlap. // branches windows overlap.
windowNames = lo.UniqBy(windowNames, func(windowName string) boxlayout.Dimensions { windowNames = lo.UniqBy(windowNames, func(windowName string) boxlayout.Dimensions {
return windows[windowName] return windows[windowName]

View File

@ -87,7 +87,7 @@ func (self *WorkingTreeHelper) OpenMergeTool() error {
} }
func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error { func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error {
return self.WithEnsureCommitableFiles(func() error { return self.WithEnsureCommittableFiles(func() error {
self.commitsHelper.OpenCommitMessagePanel( self.commitsHelper.OpenCommitMessagePanel(
&OpenCommitMessagePanelOpts{ &OpenCommitMessagePanelOpts{
CommitIndex: context.NoCommitIndex, CommitIndex: context.NoCommitIndex,
@ -131,7 +131,7 @@ func (self *WorkingTreeHelper) switchFromCommitMessagePanelToEditor(filepath str
// HandleCommitEditorPress - handle when the user wants to commit changes via // HandleCommitEditorPress - handle when the user wants to commit changes via
// their editor rather than via the popup panel // their editor rather than via the popup panel
func (self *WorkingTreeHelper) HandleCommitEditorPress() error { func (self *WorkingTreeHelper) HandleCommitEditorPress() error {
return self.WithEnsureCommitableFiles(func() error { return self.WithEnsureCommittableFiles(func() error {
self.c.LogAction(self.c.Tr.Actions.Commit) self.c.LogAction(self.c.Tr.Actions.Commit)
return self.c.RunSubprocessAndRefresh( return self.c.RunSubprocessAndRefresh(
self.c.Git().Commit.CommitEditorCmdObj(), self.c.Git().Commit.CommitEditorCmdObj(),
@ -172,7 +172,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error {
return self.HandleCommitPressWithMessage(message) return self.HandleCommitPressWithMessage(message)
} }
func (self *WorkingTreeHelper) WithEnsureCommitableFiles(handler func() error) error { func (self *WorkingTreeHelper) WithEnsureCommittableFiles(handler func() error) error {
if err := self.prepareFilesForCommit(); err != nil { if err := self.prepareFilesForCommit(); err != nil {
return err return err
} }

View File

@ -736,7 +736,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error {
Title: self.c.Tr.AmendCommitTitle, Title: self.c.Tr.AmendCommitTitle,
Prompt: self.c.Tr.AmendCommitPrompt, Prompt: self.c.Tr.AmendCommitPrompt,
HandleConfirm: func() error { HandleConfirm: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
if err := self.c.Helpers().AmendHelper.AmendHead(); err != nil { if err := self.c.Helpers().AmendHelper.AmendHead(); err != nil {
return err return err
} }
@ -752,7 +752,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error {
Title: self.c.Tr.AmendCommitTitle, Title: self.c.Tr.AmendCommitTitle,
Prompt: self.c.Tr.AmendCommitPrompt, Prompt: self.c.Tr.AmendCommitPrompt,
HandleConfirm: func() error { HandleConfirm: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
return self.c.WithWaitingStatus(self.c.Tr.AmendingStatus, func(gocui.Task) error { return self.c.WithWaitingStatus(self.c.Tr.AmendingStatus, func(gocui.Task) error {
self.c.LogAction(self.c.Tr.Actions.AmendCommit) self.c.LogAction(self.c.Tr.Actions.AmendCommit)
err := self.c.Git().Rebase.AmendTo(self.c.Model().Commits, self.context().GetView().SelectedLineIdx()) err := self.c.Git().Rebase.AmendTo(self.c.Model().Commits, self.context().GetView().SelectedLineIdx())
@ -928,7 +928,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err
Label: self.c.Tr.FixupMenu_Fixup, Label: self.c.Tr.FixupMenu_Fixup,
Key: 'f', Key: 'f',
OnPress: func() error { OnPress: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit) self.c.LogAction(self.c.Tr.Actions.CreateFixupCommit)
return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error { return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error {
if err := self.c.Git().Commit.CreateFixupCommit(commit.Hash); err != nil { if err := self.c.Git().Commit.CreateFixupCommit(commit.Hash); err != nil {
@ -951,7 +951,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err
Label: self.c.Tr.FixupMenu_AmendWithChanges, Label: self.c.Tr.FixupMenu_AmendWithChanges,
Key: 'a', Key: 'a',
OnPress: func() error { OnPress: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error { return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
return self.createAmendCommit(commit, true) return self.createAmendCommit(commit, true)
}) })
}, },

View File

@ -41,7 +41,7 @@ const (
func NewState(diff string, selectedLineIdx int, view *gocui.View, oldState *State) *State { func NewState(diff string, selectedLineIdx int, view *gocui.View, oldState *State) *State {
if oldState != nil && diff == oldState.diff && selectedLineIdx == -1 { if oldState != nil && diff == oldState.diff && selectedLineIdx == -1 {
// if we're here then we can return the old state. If selectedLineIdx was not -1 // if we're here then we can return the old state. If selectedLineIdx was not -1
// then that would mean we were trying to click and potentiall drag a range, which // then that would mean we were trying to click and potentially drag a range, which
// is why in that case we continue below // is why in that case we continue below
return oldState return oldState
} }

View File

@ -1076,7 +1076,7 @@ func EnglishTranslationSet() *TranslationSet {
Checkout: "Checkout", Checkout: "Checkout",
CheckoutTooltip: "Checkout selected item.", CheckoutTooltip: "Checkout selected item.",
CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch", CantCheckoutBranchWhilePulling: "You cannot checkout another branch while pulling the current branch",
TagCheckoutTooltip: "Checkout the selected tag tag as a detached HEAD.", TagCheckoutTooltip: "Checkout the selected tag as a detached HEAD.",
RemoteBranchCheckoutTooltip: "Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.", RemoteBranchCheckoutTooltip: "Checkout a new local branch based on the selected remote branch, or the remote branch as a detached head.",
CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled", CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled",
FileFilter: "Filter files by status", FileFilter: "Filter files by status",

View File

@ -4,7 +4,7 @@
package clients package clients
// This file allows you to use `go test` to run integration tests. // This file allows you to use `go test` to run integration tests.
// See See pkg/integration/README.md for more info. // See pkg/integration/README.md for more info.
import ( import (
"bytes" "bytes"

View File

@ -19,7 +19,7 @@ const (
// which is good to test for. // which is good to test for.
PWD = "PWD" PWD = "PWD"
// We set $HOME and $GIT_CONFIG_NOGLOBAL during integrationt tests so // We set $HOME and $GIT_CONFIG_NOGLOBAL during integration tests so
// that older versions of git that don't respect $GIT_CONFIG_GLOBAL // that older versions of git that don't respect $GIT_CONFIG_GLOBAL
// will find the correct global config file for testing // will find the correct global config file for testing
HOME = "HOME" HOME = "HOME"

View File

@ -14,6 +14,6 @@ func setGeneratedAuthorColours(config *config.AppConfig) {
} }
func setDefaultDemoConfig(config *config.AppConfig) { func setDefaultDemoConfig(config *config.AppConfig) {
// demos look much nicers with icons shown // demos look much nicer with icons shown
config.GetUserConfig().Gui.NerdFontsVersion = "3" config.GetUserConfig().Gui.NerdFontsVersion = "3"
} }

View File

@ -23,7 +23,7 @@ var FetchPrune = NewIntegrationTest(NewIntegrationTestArgs{
shell.SetBranchUpstream("master", "origin/master") shell.SetBranchUpstream("master", "origin/master")
shell.SetBranchUpstream("branch_to_remove", "origin/branch_to_remove") shell.SetBranchUpstream("branch_to_remove", "origin/branch_to_remove")
// # unbenownst to our test repo we're removing the branch on the remote, so upon // # unbeknownst to our test repo we're removing the branch on the remote, so upon
// # fetching with prune: true we expect git to realise the remote branch is gone // # fetching with prune: true we expect git to realise the remote branch is gone
shell.RemoveRemoteBranch("origin", "branch_to_remove") shell.RemoveRemoteBranch("origin", "branch_to_remove")
}, },

View File

@ -33,7 +33,7 @@ func main() {
} }
func generateCode() []byte { func generateCode() []byte {
// traverse parent directory to get all subling directories // traverse parent directory to get all sibling directories
directories, err := os.ReadDir("../tests") directories, err := os.ReadDir("../tests")
if err != nil { if err != nil {
panic(err) panic(err)

View File

@ -5,7 +5,7 @@ import (
. "github.com/jesseduffield/lazygit/pkg/integration/components" . "github.com/jesseduffield/lazygit/pkg/integration/components"
) )
// When in acccordion mode, Lazygit looks like this: // When in accordion mode, Lazygit looks like this:
// //
// ╶─Status─────────────────────────╴┌─Patch──────────────────────────────────────────────────────────┐ // ╶─Status─────────────────────────╴┌─Patch──────────────────────────────────────────────────────────┐
// ╶─Files - Submodules──────0 of 0─╴│commit 6e56dd04b70e548976f7f2928c4d9c359574e2bc ▲ // ╶─Files - Submodules──────0 of 0─╴│commit 6e56dd04b70e548976f7f2928c4d9c359574e2bc ▲

View File

@ -8,7 +8,7 @@ import (
// This case is identical to dotfile_bare_repo.go, except // This case is identical to dotfile_bare_repo.go, except
// that it invokes lazygit with $GIT_DIR set but not // that it invokes lazygit with $GIT_DIR set but not
// $GIT_WORK_TREE. Instead, the repo uses the core.worktree // $GIT_WORK_TREE. Instead, the repo uses the core.worktree
// config to identify the main worktre. // config to identify the main worktree.
var BareRepoWorktreeConfig = NewIntegrationTest(NewIntegrationTestArgs{ var BareRepoWorktreeConfig = NewIntegrationTest(NewIntegrationTestArgs{
Description: "Open lazygit in the worktree of a vcsh-style bare repo and add a file and commit", Description: "Open lazygit in the worktree of a vcsh-style bare repo and add a file and commit",