From 71cd2fc5b989afa66650545b38e8b9e5246887f1 Mon Sep 17 00:00:00 2001 From: Masaya Suzuki Date: Wed, 4 Sep 2024 13:37:23 -0700 Subject: [PATCH] Fix spelling errors (#412) Fixed with https://github.com/codespell-project/codespell --- e2e_tests/stack_restack_test.go | 2 +- e2e_tests/stack_sync_test.go | 2 +- internal/actions/pr.go | 2 +- internal/git/git.go | 8 ++++---- internal/git/gittest/repo.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e_tests/stack_restack_test.go b/e2e_tests/stack_restack_test.go index 39ff6278..fc2ff4ae 100644 --- a/e2e_tests/stack_restack_test.go +++ b/e2e_tests/stack_restack_test.go @@ -127,7 +127,7 @@ func TestStackRestack(t *testing.T) { stack1Head := repo.GetCommitAtRef(t, plumbing.NewBranchReferenceName("stack-1")) require.Equal(t, mergeBases[0], stack1Head, "stack-2 should be up-to-date with stack-1") - // Further sync attemps should yield no-ops + // Further sync attempts should yield no-ops syncNoop := RequireAv(t, "stack", "restack") require.Contains(t, syncNoop.Stdout, "Restack is done") diff --git a/e2e_tests/stack_sync_test.go b/e2e_tests/stack_sync_test.go index 20066b82..1e6d68f0 100644 --- a/e2e_tests/stack_sync_test.go +++ b/e2e_tests/stack_sync_test.go @@ -133,7 +133,7 @@ func TestStackSync(t *testing.T) { stack1Head := repo.GetCommitAtRef(t, plumbing.NewBranchReferenceName("stack-1")) require.Equal(t, mergeBases[0], stack1Head, "stack-2 should be up-to-date with stack-1") - // Further sync attemps should yield no-ops + // Further sync attempts should yield no-ops syncNoop := RequireAv(t, "stack", "sync") require.Contains(t, syncNoop.Stdout, "Restack is done") diff --git a/internal/actions/pr.go b/internal/actions/pr.go index e13d09d9..9cb9637b 100644 --- a/internal/actions/pr.go +++ b/internal/actions/pr.go @@ -368,7 +368,7 @@ func CreatePullRequest( } // Otherwise, save what the user entered to a file so that it's not - // lost forever (and we can re-use it if they try again). + // lost forever (and we can reuse it if they try again). savePRDescriptionToTemporaryFile(saveFile, res) }() } diff --git a/internal/git/git.go b/internal/git/git.go index c9aca7b5..a6e4eb14 100644 --- a/internal/git/git.go +++ b/internal/git/git.go @@ -348,9 +348,9 @@ func (r *Repo) RevParse(rp *RevParse) (string, error) { return r.Git(args...) } -func (r *Repo) MergeBase(commitishes ...string) (string, error) { +func (r *Repo) MergeBase(committishes ...string) (string, error) { args := []string{"merge-base"} - args = append(args, commitishes...) + args = append(args, committishes...) str, err := r.Git(args...) if err != nil { return "", err @@ -363,11 +363,11 @@ type BranchAndCommit struct { Branch string } -func (r *Repo) BranchesContainCommitish(commitish string) ([]BranchAndCommit, error) { +func (r *Repo) BranchesContainCommittish(committish string) ([]BranchAndCommit, error) { lines, err := r.Git( "for-each-ref", "--contains", - commitish, + committish, "--format=%(objectname) %(refname:short)", "refs/heads", ) diff --git a/internal/git/gittest/repo.go b/internal/git/gittest/repo.go index 172cf99a..24413575 100644 --- a/internal/git/gittest/repo.go +++ b/internal/git/gittest/repo.go @@ -63,7 +63,7 @@ func NewTempRepoWithGitHubServer(t *testing.T, serverURL string) *GitTestRepo { settings := map[string]string{ "user.name": "av-test", - "user.email": "av-test@nonexistant", + "user.email": "av-test@nonexistent", } for k, v := range settings { repo.Git(t, "config", k, v)