From 4bbfe7b3cca99387e35b58b507ad33cc1f03bc6d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Sat, 17 Aug 2024 13:38:37 -0400 Subject: [PATCH] [DATALAD RUNCMD] run codespell throughout fixing typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ Signed-off-by: Yaroslav Halchenko --- docs/dev/Codebase_Guide.md | 2 +- docs/dev/Find_Base_Commit_For_Fixup_Design.md | 2 +- pkg/gui/context/sub_commits_context.go | 2 +- pkg/gui/controllers/helpers/confirmation_helper.go | 2 +- pkg/gui/controllers/helpers/refresh_helper.go | 2 +- pkg/gui/types/context.go | 2 +- pkg/i18n/english.go | 2 +- pkg/integration/components/text_matcher.go | 2 +- pkg/integration/components/view_driver.go | 2 +- .../tests/filter_and_search/nested_filter_transient.go | 2 +- pkg/integration/tests/misc/recent_repos_on_launch.go | 2 +- scripts/bisect.sh | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/dev/Codebase_Guide.md b/docs/dev/Codebase_Guide.md index aaa6b358b..1692be33e 100644 --- a/docs/dev/Codebase_Guide.md +++ b/docs/dev/Codebase_Guide.md @@ -2,7 +2,7 @@ ## Packages -* `pkg/app`: Contains startup code, inititalises a bunch of stuff like logging, the user config, etc, before starting the gui. Catches and handles some errors that the gui raises. +* `pkg/app`: Contains startup code, initialises a bunch of stuff like logging, the user config, etc, before starting the gui. Catches and handles some errors that the gui raises. * `pkg/app/daemon`: Contains code relating to the lazygit daemon. This could be better named: it's is not a daemon in the sense that it's a long-running background process; rather it's a short-lived background process that we pass to git for certain tasks, like GIT_EDITOR for when we want to set the TODO file for an interactive rebase. * `pkg/cheatsheet`: Generates the keybinding cheatsheets in `docs/keybindings`. * `pkg/commands/git_commands`: All communication to the git binary happens here. So for example there's a `Checkout` method which calls `git checkout`. diff --git a/docs/dev/Find_Base_Commit_For_Fixup_Design.md b/docs/dev/Find_Base_Commit_For_Fixup_Design.md index 4eff43b31..cf28bdae2 100644 --- a/docs/dev/Find_Base_Commit_For_Fixup_Design.md +++ b/docs/dev/Find_Base_Commit_For_Fixup_Design.md @@ -122,7 +122,7 @@ is this: "github.com/jesseduffield/lazygit/pkg/utils" + "github.com/samber/lo" "golang.org/x/sync/errgroup" -@@ -308,9 +309,5 @@ func (self *FixupHelper) blameAddedLines(addedLineHunks []*hunk) ([]string, erro +@@ -308,9 +309,5 @@ func (self *FixupHelper) blameAddedLines(addedLineHunks []*hunk) ([]string, error func findCommit(hash string) (*models.Commit, int, bool) { - for i, commit := range self.c.Model().Commits { - if commit.Hash == hash { diff --git a/pkg/gui/context/sub_commits_context.go b/pkg/gui/context/sub_commits_context.go index d1a63b750..6adb7a53e 100644 --- a/pkg/gui/context/sub_commits_context.go +++ b/pkg/gui/context/sub_commits_context.go @@ -40,7 +40,7 @@ func NewSubCommitsContext( getDisplayStrings := func(startIdx int, endIdx int) [][]string { // This can happen if a sub-commits view is asked to be rerendered while - // it is invisble; for example when switching screen modes, which + // it is invisible; for example when switching screen modes, which // rerenders all views. if viewModel.GetRef() == nil { return [][]string{} diff --git a/pkg/gui/controllers/helpers/confirmation_helper.go b/pkg/gui/controllers/helpers/confirmation_helper.go index 60329cbed..43e230272 100644 --- a/pkg/gui/controllers/helpers/confirmation_helper.go +++ b/pkg/gui/controllers/helpers/confirmation_helper.go @@ -347,7 +347,7 @@ func (self *ConfirmationHelper) resizeMenu(parentPopupContext types.Context) { } // Wraps the lines of the menu prompt to the available width and rerenders the -// menu if neeeded. Returns the number of lines the prompt takes up. +// menu if needed. Returns the number of lines the prompt takes up. func (self *ConfirmationHelper) layoutMenuPrompt(contentWidth int) int { oldPromptLines := self.c.Contexts().Menu.GetPromptLines() var promptLines []string diff --git a/pkg/gui/controllers/helpers/refresh_helper.go b/pkg/gui/controllers/helpers/refresh_helper.go index 7af45d142..c43c3ddab 100644 --- a/pkg/gui/controllers/helpers/refresh_helper.go +++ b/pkg/gui/controllers/helpers/refresh_helper.go @@ -621,7 +621,7 @@ func (self *RefreshHelper) refreshStateFiles() error { // FilteredReflogCommits are rendered in the reflogs panel, and ReflogCommits // are used by the branches panel to obtain recency values for sorting. func (self *RefreshHelper) refreshReflogCommits() error { - // pulling state into its own variable incase it gets swapped out for another state + // pulling state into its own variable in case it gets swapped out for another state // and we get an out of bounds exception model := self.c.Model() var lastReflogCommit *models.Commit diff --git a/pkg/gui/types/context.go b/pkg/gui/types/context.go index f48a6b595..cacdb8564 100644 --- a/pkg/gui/types/context.go +++ b/pkg/gui/types/context.go @@ -20,7 +20,7 @@ const ( // When you open a popup over it, we'll let you return to it upon pressing escape PERSISTENT_POPUP // A temporary popup is one that could be used for various things (e.g. a generic menu or confirmation popup). - // Because we re-use these contexts, they're temporary in that you can't return to them after you've switched from them + // Because we reuse these contexts, they're temporary in that you can't return to them after you've switched from them // to some other context, because the context you switched to might actually be the same context but rendering different content. // We should really be able to spawn new contexts for menus/prompts so that we can actually return to old ones. TEMPORARY_POPUP diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index b1eff335e..aa88d397a 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -1720,7 +1720,7 @@ func EnglishTranslationSet() *TranslationSet { MovePatchIntoNewCommit: "Move patch into new commit", MovePatchIntoNewCommitTooltip: "Move the patch out of its commit and into a new commit sitting on top of the original commit. This is achieved by starting an interactive rebase at the original commit, applying the patch in reverse, then applying the patch to the index and committing it as a new commit, before continuing the rebase to completion. If later commits depend on the patch, you may need to resolve conflicts.", MovePatchToSelectedCommit: "Move patch to selected commit (%s)", - MovePatchToSelectedCommitTooltip: "Move the patch out of its original commit and into the selected commit. This is achieved by starting an interactive rebase at the original commit, applying the patch in reverse, then continuing the rebase up to the selected commit, before applying the patch forward and amending the seleced commit. The rebase is then continued to completion. If commits between the source and destination commit depend on the patch, you may need to resolve conflicts.", + MovePatchToSelectedCommitTooltip: "Move the patch out of its original commit and into the selected commit. This is achieved by starting an interactive rebase at the original commit, applying the patch in reverse, then continuing the rebase up to the selected commit, before applying the patch forward and amending the selected commit. The rebase is then continued to completion. If commits between the source and destination commit depend on the patch, you may need to resolve conflicts.", CopyPatchToClipboard: "Copy patch to clipboard", NoMatchesFor: "No matches for '%s' %s", ExitSearchMode: "%s: Exit search mode", diff --git a/pkg/integration/components/text_matcher.go b/pkg/integration/components/text_matcher.go index 8d8077922..3970dc778 100644 --- a/pkg/integration/components/text_matcher.go +++ b/pkg/integration/components/text_matcher.go @@ -96,7 +96,7 @@ func (self *TextMatcher) IsSelected() *TextMatcher { // if the matcher has an `IsSelected` rule, it returns true, along with the matcher after that rule has been removed func (self *TextMatcher) checkIsSelected() (bool, *TextMatcher) { - // copying into a new matcher in case we want to re-use the original later + // copying into a new matcher in case we want to reuse the original later newMatcher := &TextMatcher{Matcher: &Matcher[string]{}} *newMatcher.Matcher = *self.Matcher diff --git a/pkg/integration/components/view_driver.go b/pkg/integration/components/view_driver.go index 3abd63a9e..d6ee436cb 100644 --- a/pkg/integration/components/view_driver.go +++ b/pkg/integration/components/view_driver.go @@ -75,7 +75,7 @@ func (self *ViewDriver) VisibleLines(matchers ...*TextMatcher) *ViewDriver { return self.assertLines(originY, matchers...) } -// asserts that somewhere in the view there are consequetive lines matching the given matchers. +// asserts that somewhere in the view there are consecutive lines matching the given matchers. func (self *ViewDriver) ContainsLines(matchers ...*TextMatcher) *ViewDriver { self.validateMatchersPassed(matchers) self.validateEnoughLines(matchers) diff --git a/pkg/integration/tests/filter_and_search/nested_filter_transient.go b/pkg/integration/tests/filter_and_search/nested_filter_transient.go index bf04406f5..3bc8e78bb 100644 --- a/pkg/integration/tests/filter_and_search/nested_filter_transient.go +++ b/pkg/integration/tests/filter_and_search/nested_filter_transient.go @@ -10,7 +10,7 @@ import ( // can be relocated elsewhere if you need them somewhere else. So for example if // I hit enter on a branch I'll see the sub-commits view, but if I then navigate // to the reflog context and hit enter on a reflog, the sub-commits view is moved -// to the reflog window. This is because we re-use the same view (it's a limitation +// to the reflog window. This is because we reuse the same view (it's a limitation // that would be nice to remove in the future). // Nonetheless, we need to ensure that upon moving the view, the filter is cancelled. diff --git a/pkg/integration/tests/misc/recent_repos_on_launch.go b/pkg/integration/tests/misc/recent_repos_on_launch.go index ac4309e6f..8cf4382a5 100644 --- a/pkg/integration/tests/misc/recent_repos_on_launch.go +++ b/pkg/integration/tests/misc/recent_repos_on_launch.go @@ -6,7 +6,7 @@ import ( ) // Couldn't find an easy way to actually reproduce the situation of opening outside a repo, -// so I'm introducing a hacky env var to force lazygit to show the recent repos meu upon opening. +// so I'm introducing a hacky env var to force lazygit to show the recent repos menu upon opening. var RecentReposOnLaunch = NewIntegrationTest(NewIntegrationTestArgs{ Description: "When opening to a menu, focus is correctly given to the menu", diff --git a/scripts/bisect.sh b/scripts/bisect.sh index 3652a85b8..72017e806 100755 --- a/scripts/bisect.sh +++ b/scripts/bisect.sh @@ -11,7 +11,7 @@ # It's assumed that the current commit (i.e. HEAD) is broken. if [[ $# -ne 3 ]] ; then - echo 'Usage: scripts/bisect.sh ' + echo 'Usage: scripts/bisect.sh ' exit 1 fi