mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
chore: typo hunting ft. codespell
This commit is contained in:
committed by
Jesse Duffield
parent
3b5a019e1a
commit
b7928042f0
2
main.go
2
main.go
@ -62,7 +62,7 @@ func main() {
|
|||||||
flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument")
|
flaggy.String(&gitDir, "g", "git-dir", "equivalent of the --git-dir git argument")
|
||||||
|
|
||||||
customConfig := ""
|
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()
|
flaggy.Parse()
|
||||||
|
|
||||||
|
@ -17,11 +17,11 @@ func Check() {
|
|||||||
tmpDir := filepath.Join(os.TempDir(), "lazygit_cheatsheet")
|
tmpDir := filepath.Join(os.TempDir(), "lazygit_cheatsheet")
|
||||||
err := os.RemoveAll(tmpDir)
|
err := os.RemoveAll(tmpDir)
|
||||||
if err != 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)
|
||||||
}
|
}
|
||||||
err = os.Mkdir(tmpDir, 0o700)
|
err = os.Mkdir(tmpDir, 0o700)
|
||||||
if err != 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)
|
||||||
}
|
}
|
||||||
|
|
||||||
generateAtDir(tmpDir)
|
generateAtDir(tmpDir)
|
||||||
@ -45,7 +45,7 @@ func Check() {
|
|||||||
Context: 1,
|
Context: 1,
|
||||||
})
|
})
|
||||||
if err != 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)
|
||||||
}
|
}
|
||||||
fmt.Printf("\nCheatsheets are out of date. Please run `%s` at the project root and commit the changes\n", CommandToRun())
|
fmt.Printf("\nCheatsheets are out of date. Please run `%s` at the project root and commit the changes\n", CommandToRun())
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@ -62,7 +62,7 @@ func obtainContent(dir string) string {
|
|||||||
if re.MatchString(path) {
|
if re.MatchString(path) {
|
||||||
bytes, err := ioutil.ReadFile(path)
|
bytes, err := ioutil.ReadFile(path)
|
||||||
if err != 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)
|
||||||
}
|
}
|
||||||
content += fmt.Sprintf("\n%s\n\n", filepath.Base(path))
|
content += fmt.Sprintf("\n%s\n\n", filepath.Base(path))
|
||||||
content += string(bytes)
|
content += string(bytes)
|
||||||
@ -71,7 +71,7 @@ func obtainContent(dir string) string {
|
|||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != 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
|
return content
|
||||||
|
@ -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) {
|
func(string) (os.FileInfo, error) {
|
||||||
return nil, fmt.Errorf("An error occurred")
|
return nil, fmt.Errorf("An error occurred")
|
||||||
},
|
},
|
||||||
|
@ -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",
|
from: "feature/new",
|
||||||
to: "dev",
|
to: "dev",
|
||||||
remoteUrl: "git@ssh.dev.azure.com:v3/myorg/myproject/myrepo",
|
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",
|
from: "feature/new",
|
||||||
to: "dev",
|
to: "dev",
|
||||||
remoteUrl: "https://myorg@dev.azure.com/myorg/myproject/_git/myrepo",
|
remoteUrl: "https://myorg@dev.azure.com/myorg/myproject/_git/myrepo",
|
||||||
|
@ -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,
|
// 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
|
// 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.
|
// 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 {
|
if lastReflogCommit != nil && commit.Sha == lastReflogCommit.Sha && commit.UnixTimestamp == lastReflogCommit.UnixTimestamp && commit.Name == lastReflogCommit.Name {
|
||||||
|
@ -235,7 +235,7 @@ func configFilePath(filename string) (string, error) {
|
|||||||
|
|
||||||
var ConfigFilename = "config.yml"
|
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 {
|
func (c *AppConfig) ConfigFilename() string {
|
||||||
return filepath.Join(c.UserConfigDir, ConfigFilename)
|
return filepath.Join(c.UserConfigDir, ConfigFilename)
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ type GitConfig struct {
|
|||||||
OverrideGpg bool `yaml:"overrideGpg"`
|
OverrideGpg bool `yaml:"overrideGpg"`
|
||||||
DisableForcePushing bool `yaml:"disableForcePushing"`
|
DisableForcePushing bool `yaml:"disableForcePushing"`
|
||||||
CommitPrefixes map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
|
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"`
|
ParseEmoji bool `yaml:"parseEmoji"`
|
||||||
Log LogConfig `yaml:"log"`
|
Log LogConfig `yaml:"log"`
|
||||||
DiffContextSize int `yaml:"diffContextSize"`
|
DiffContextSize int `yaml:"diffContextSize"`
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
"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.
|
// See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Command_Keybindings.md for more info.
|
||||||
type Client struct {
|
type Client struct {
|
||||||
customCommands []config.CustomCommand
|
customCommands []config.CustomCommand
|
||||||
|
@ -370,7 +370,7 @@ func generateSnapshot(dir string) (string, error) {
|
|||||||
|
|
||||||
cmdStrs := []string{
|
cmdStrs := []string{
|
||||||
`remote show -n origin`, // remote branches
|
`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`,
|
// `ls-remote origin`,
|
||||||
`status`, // file tree
|
`status`, // file tree
|
||||||
`log --pretty=%B -p -1`, // log
|
`log --pretty=%B -p -1`, // log
|
||||||
|
@ -69,7 +69,7 @@ func TestNewCmdTaskInstantStop(t *testing.T) {
|
|||||||
expectedContent := ""
|
expectedContent := ""
|
||||||
actualContent := writer.String()
|
actualContent := writer.String()
|
||||||
if actualContent != expectedContent {
|
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"
|
expectedContent := "prefix\ntest\n"
|
||||||
actualContent := writer.String()
|
actualContent := writer.String()
|
||||||
if actualContent != expectedContent {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ git config user.email "test@example.com"
|
|||||||
git config user.name "Lazygit Tester"
|
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
|
cat <<EOT >> charstest.txt
|
||||||
ANSI Œ (U+0152 Œ Latin capital ligature OE Latin Extended-A)
|
ANSI Œ (U+0152 Œ Latin capital ligature OE Latin Extended-A)
|
||||||
¥ (0xA5 U+00A5 ¥ yes sign)
|
¥ (0xA5 U+00A5 ¥ yes sign)
|
||||||
|
Reference in New Issue
Block a user