Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dev/Busy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 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
2) wait until Lazygit is idle
3) run assertion / press another key
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_nl.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/keybindings/Keybindings_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ If you would instead like to start an interactive rebase from the selected commi

| 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. |
| `` d `` | 刪除 | View delete options for local/remote tag. |
| `` P `` | 推送標籤 | Push the selected tag to a remote. You'll be prompted to select a remote. |
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/oscommands/os_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestOSCommandFileType(t *testing.T) {
},
},
{
"nonExistant",
"nonExistent",
func() {},
func(output string) {
assert.EqualValues(t, "other", output)
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/context/list_context_trait.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool {
return false
}

// By default, list contexts supporta range select
// By default, list contexts supports range select
func (self *ListContextTrait) RangeSelectEnabled() bool {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/controllers/files_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ func (self *FilesController) handleAmendCommitPress() error {
Title: self.c.Tr.AmendLastCommitTitle,
Prompt: self.c.Tr.SureToAmend,
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 {
return errors.New(self.c.Tr.NoCommitToAmend)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/gui/controllers/helpers/refs_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (self *RefsHelper) CheckoutRef(ref string, options types.CheckoutRefOptions
return options.OnRefNotFound(ref)
}

if IsSwitchBranchUncommitedChangesError(err) {
if IsSwitchBranchUncommittedChangesError(err) {
// offer to autostash changes
self.c.OnUIThread(func() error {
// (Before showing the prompt, render again to remove the inline status)
Expand Down Expand Up @@ -353,7 +353,7 @@ func (self *RefsHelper) NewBranch(from string, fromFormattedName string, suggest
newBranchFunc = self.c.Git().Branch.NewWithoutTracking
}
if err := newBranchFunc(newBranchName, from); err != nil {
if IsSwitchBranchUncommitedChangesError(err) {
if IsSwitchBranchUncommittedChangesError(err) {
// offer to autostash changes
self.c.Confirm(types.ConfirmOpts{
Title: self.c.Tr.AutoStashTitle,
Expand Down Expand Up @@ -413,6 +413,6 @@ func (self *RefsHelper) ParseRemoteBranchName(fullBranchName string) (string, st
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")
}
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func renderLayout(windows map[string]boxlayout.Dimensions) string {
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.
windowNames = lo.UniqBy(windowNames, func(windowName string) boxlayout.Dimensions {
return windows[windowName]
Expand Down
6 changes: 3 additions & 3 deletions pkg/gui/controllers/helpers/working_tree_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (self *WorkingTreeHelper) OpenMergeTool() error {
}

func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage string) error {
return self.WithEnsureCommitableFiles(func() error {
return self.WithEnsureCommittableFiles(func() error {
self.commitsHelper.OpenCommitMessagePanel(
&OpenCommitMessagePanelOpts{
CommitIndex: context.NoCommitIndex,
Expand Down Expand Up @@ -131,7 +131,7 @@ func (self *WorkingTreeHelper) switchFromCommitMessagePanelToEditor(filepath str
// HandleCommitEditorPress - handle when the user wants to commit changes via
// their editor rather than via the popup panel
func (self *WorkingTreeHelper) HandleCommitEditorPress() error {
return self.WithEnsureCommitableFiles(func() error {
return self.WithEnsureCommittableFiles(func() error {
self.c.LogAction(self.c.Tr.Actions.Commit)
return self.c.RunSubprocessAndRefresh(
self.c.Git().Commit.CommitEditorCmdObj(),
Expand Down Expand Up @@ -172,7 +172,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error {
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 {
return err
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/gui/controllers/local_commits_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error {
Title: self.c.Tr.AmendCommitTitle,
Prompt: self.c.Tr.AmendCommitPrompt,
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 {
return err
}
Expand All @@ -752,7 +752,7 @@ func (self *LocalCommitsController) amendTo(commit *models.Commit) error {
Title: self.c.Tr.AmendCommitTitle,
Prompt: self.c.Tr.AmendCommitPrompt,
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 {
self.c.LogAction(self.c.Tr.Actions.AmendCommit)
err := self.c.Git().Rebase.AmendTo(self.c.Model().Commits, self.context().GetView().SelectedLineIdx())
Expand Down Expand Up @@ -928,7 +928,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err
Label: self.c.Tr.FixupMenu_Fixup,
Key: 'f',
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)
return self.c.WithWaitingStatusSync(self.c.Tr.CreatingFixupCommitStatus, func() error {
if err := self.c.Git().Commit.CreateFixupCommit(commit.Hash); err != nil {
Expand All @@ -951,7 +951,7 @@ func (self *LocalCommitsController) createFixupCommit(commit *models.Commit) err
Label: self.c.Tr.FixupMenu_AmendWithChanges,
Key: 'a',
OnPress: func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommitableFiles(func() error {
return self.c.Helpers().WorkingTree.WithEnsureCommittableFiles(func() error {
return self.createAmendCommit(commit, true)
})
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/gui/patch_exploring/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
func NewState(diff string, selectedLineIdx int, view *gocui.View, oldState *State) *State {
if oldState != nil && diff == oldState.diff && selectedLineIdx == -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
return oldState
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/i18n/english.go
Original file line number Diff line number Diff line change
Expand Up @@ -1076,7 +1076,7 @@ func EnglishTranslationSet() *TranslationSet {
Checkout: "Checkout",
CheckoutTooltip: "Checkout selected item.",
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.",
CantPullOrPushSameBranchTwice: "You cannot push or pull a branch while it is already being pushed or pulled",
FileFilter: "Filter files by status",
Expand Down
2 changes: 1 addition & 1 deletion pkg/integration/clients/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package clients

// 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 (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion pkg/integration/components/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
// which is good to test for.
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
// will find the correct global config file for testing
HOME = "HOME"
Expand Down
2 changes: 1 addition & 1 deletion pkg/integration/tests/demo/shared.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ func setGeneratedAuthorColours(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"
}
2 changes: 1 addition & 1 deletion pkg/integration/tests/sync/fetch_prune.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var FetchPrune = NewIntegrationTest(NewIntegrationTestArgs{
shell.SetBranchUpstream("master", "origin/master")
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
shell.RemoveRemoteBranch("origin", "branch_to_remove")
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/integration/tests/test_list_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func main() {
}

func generateCode() []byte {
// traverse parent directory to get all subling directories
// traverse parent directory to get all sibling directories
directories, err := os.ReadDir("../tests")
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/integration/tests/ui/accordion.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
. "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──────────────────────────────────────────────────────────┐
// ╶─Files - Submodules──────0 of 0─╴│commit 6e56dd04b70e548976f7f2928c4d9c359574e2bc ▲
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
// This case is identical to dotfile_bare_repo.go, except
// that it invokes lazygit with $GIT_DIR set but not
// $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{
Description: "Open lazygit in the worktree of a vcsh-style bare repo and add a file and commit",
Expand Down
Loading