1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-03 13:21:56 +02:00

chore: typo hunting ft. codespell

This commit is contained in:
casswedson 2022-04-03 15:19:15 -05:00 committed by Jesse Duffield
parent 3b5a019e1a
commit b7928042f0
11 changed files with 17 additions and 17 deletions

View File

@ -62,7 +62,7 @@ func main() {
flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument")
customConfig := ""
flaggy.String(&customConfig, "ucf", "use-config-file", "Comma seperated list to custom config file(s)")
flaggy.String(&customConfig, "ucf", "use-config-file", "Comma separated list to custom config file(s)")
flaggy.Parse()

View File

@ -17,11 +17,11 @@ func Check() {
tmpDir := filepath.Join(os.TempDir(), "lazygit_cheatsheet")
err := os.RemoveAll(tmpDir)
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err)
}
err = os.Mkdir(tmpDir, 0o700)
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err)
}
generateAtDir(tmpDir)
@ -45,7 +45,7 @@ func Check() {
Context: 1,
})
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err)
}
fmt.Printf("\nCheatsheets are out of date. Please run `%s` at the project root and commit the changes\n", CommandToRun())
os.Exit(1)
@ -62,7 +62,7 @@ func obtainContent(dir string) string {
if re.MatchString(path) {
bytes, err := ioutil.ReadFile(path)
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err)
}
content += fmt.Sprintf("\n%s\n\n", filepath.Base(path))
content += string(bytes)
@ -71,7 +71,7 @@ func obtainContent(dir string) string {
return nil
})
if err != nil {
log.Fatalf("Error occured while checking if cheatsheets are up to date: %v", err)
log.Fatalf("Error occurred while checking if cheatsheets are up to date: %v", err)
}
return content

View File

@ -77,7 +77,7 @@ func TestNavigateToRepoRootDirectory(t *testing.T) {
},
},
{
"An error occurred when getting path informations",
"An error occurred when getting path information",
func(string) (os.FileInfo, error) {
return nil, fmt.Errorf("An error occurred")
},

View File

@ -125,7 +125,7 @@ func TestGetPullRequestURL(t *testing.T) {
},
},
{
testName: "Opens a link to new pull request on Azure DevOps (SSH) with specifc target",
testName: "Opens a link to new pull request on Azure DevOps (SSH) with specific target",
from: "feature/new",
to: "dev",
remoteUrl: "git@ssh.dev.azure.com:v3/myorg/myproject/myrepo",
@ -144,7 +144,7 @@ func TestGetPullRequestURL(t *testing.T) {
},
},
{
testName: "Opens a link to new pull request on Azure DevOps (HTTP) with specifc target",
testName: "Opens a link to new pull request on Azure DevOps (HTTP) with specific target",
from: "feature/new",
to: "dev",
remoteUrl: "https://myorg@dev.azure.com/myorg/myproject/_git/myrepo",

View File

@ -57,7 +57,7 @@ func (self *ReflogCommitLoader) GetReflogCommits(lastReflogCommit *models.Commit
}
// note that the unix timestamp here is the timestamp of the COMMIT, not the reflog entry itself,
// so two consequetive reflog entries may have both the same SHA and therefore same timestamp.
// so two consecutive reflog entries may have both the same SHA and therefore same timestamp.
// We use the reflog message to disambiguate, and fingers crossed that we never see the same of those
// twice in a row. Reason being that it would mean we'd be erroneously exiting early.
if lastReflogCommit != nil && commit.Sha == lastReflogCommit.Sha && commit.UnixTimestamp == lastReflogCommit.UnixTimestamp && commit.Name == lastReflogCommit.Name {

View File

@ -235,7 +235,7 @@ func configFilePath(filename string) (string, error) {
var ConfigFilename = "config.yml"
// ConfigFilename returns the filename of the deafult config file
// ConfigFilename returns the filename of the default config file
func (c *AppConfig) ConfigFilename() string {
return filepath.Join(c.UserConfigDir, ConfigFilename)
}

View File

@ -74,7 +74,7 @@ type GitConfig struct {
OverrideGpg bool `yaml:"overrideGpg"`
DisableForcePushing bool `yaml:"disableForcePushing"`
CommitPrefixes map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
// this shoudl really be under 'gui', not 'git'
// this should really be under 'gui', not 'git'
ParseEmoji bool `yaml:"parseEmoji"`
Log LogConfig `yaml:"log"`
DiffContextSize int `yaml:"diffContextSize"`

View File

@ -9,7 +9,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
// Client is the entry point to this package. It reutrns a list of keybindings based on the config's user-defined custom commands.
// Client is the entry point to this package. It returns a list of keybindings based on the config's user-defined custom commands.
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md for more info.
type Client struct {
customCommands []config.CustomCommand

View File

@ -370,7 +370,7 @@ func generateSnapshot(dir string) (string, error) {
cmdStrs := []string{
`remote show -n origin`, // remote branches
// TOOD: find a way to bring this back without breaking tests
// TODO: find a way to bring this back without breaking tests
// `ls-remote origin`,
`status`, // file tree
`log --pretty=%B -p -1`, // log

View File

@ -69,7 +69,7 @@ func TestNewCmdTaskInstantStop(t *testing.T) {
expectedContent := ""
actualContent := writer.String()
if actualContent != expectedContent {
t.Errorf("expected writer to receive the following content: \n%s\n. But instead it recevied: %s", expectedContent, actualContent)
t.Errorf("expected writer to receive the following content: \n%s\n. But instead it received: %s", expectedContent, actualContent)
}
}
@ -131,6 +131,6 @@ func TestNewCmdTask(t *testing.T) {
expectedContent := "prefix\ntest\n"
actualContent := writer.String()
if actualContent != expectedContent {
t.Errorf("expected writer to receive the following content: \n%s\n. But instead it recevied: %s", expectedContent, actualContent)
t.Errorf("expected writer to receive the following content: \n%s\n. But instead it received: %s", expectedContent, actualContent)
}
}

View File

@ -6,7 +6,7 @@ git config user.email "test@example.com"
git config user.name "Lazygit Tester"
# Add some ansi, unicode, zero width joiner caracters
# Add some ansi, unicode, zero width joiner characters
cat <<EOT >> charstest.txt
ANSI Œ (U+0152 &OElig; Latin capital ligature OE Latin Extended-A)
¥ (0xA5 U+00A5 &yen; yes sign)