mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-02 23:27:32 +02:00
Use getters for AppState and UserConfig instead of accessing the fields directly
This will allow us to make them private.
This commit is contained in:
parent
54765d2236
commit
55d8e801f1
@ -15,7 +15,7 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
CreateNCommits(10)
|
CreateNCommits(10)
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.AppState.GitLogShowGraph = "never"
|
cfg.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
markCommitAsBad := func() {
|
markCommitAsBad := func() {
|
||||||
|
@ -15,7 +15,7 @@ var ChooseTerms = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
CreateNCommits(10)
|
CreateNCommits(10)
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.AppState.GitLogShowGraph = "never"
|
cfg.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
markCommitAsFixed := func() {
|
markCommitAsFixed := func() {
|
||||||
|
@ -14,7 +14,7 @@ var Skip = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
CreateNCommits(10)
|
CreateNCommits(10)
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.AppState.GitLogShowGraph = "never"
|
cfg.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
t.Views().Commits().
|
t.Views().Commits().
|
||||||
|
@ -11,7 +11,7 @@ var RebaseCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,7 +10,7 @@ var RebaseOntoBaseBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
config.GetUserConfig().Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,7 +10,7 @@ var ShowDivergenceFromBaseBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
config.GetUserConfig().Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,7 +10,7 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -11,7 +11,7 @@ var AutoWrapMessage = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
// Use a ridiculously small width so that we don't have to use so much test data
|
// Use a ridiculously small width so that we don't have to use so much test data
|
||||||
config.UserConfig.Git.Commit.AutoWrapWidth = 20
|
config.GetUserConfig().Git.Commit.AutoWrapWidth = 20
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.CreateFile("file", "file content")
|
shell.CreateFile("file", "file content")
|
||||||
|
@ -9,8 +9,8 @@ var CommitWipWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Description: "Commit with skip hook and config commitPrefix is defined. Prefix is ignored when creating WIP commits.",
|
Description: "Commit with skip hook and config commitPrefix is defined. Prefix is ignored when creating WIP commits.",
|
||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(testConfig *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
testConfig.UserConfig.Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
cfg.GetUserConfig().Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("feature/TEST-002")
|
shell.NewBranch("feature/TEST-002")
|
||||||
|
@ -9,8 +9,8 @@ var CommitWithGlobalPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Description: "Commit with defined config commitPrefix",
|
Description: "Commit with defined config commitPrefix",
|
||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(testConfig *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
testConfig.UserConfig.Git.CommitPrefix = &config.CommitPrefixConfig{Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}
|
cfg.GetUserConfig().Git.CommitPrefix = &config.CommitPrefixConfig{Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("feature/TEST-001")
|
shell.NewBranch("feature/TEST-001")
|
||||||
|
@ -9,8 +9,8 @@ var CommitWithNonMatchingBranchName = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Description: "Commit with defined config commitPrefixes",
|
Description: "Commit with defined config commitPrefixes",
|
||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(testConfig *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
testConfig.UserConfig.Git.CommitPrefix = &config.CommitPrefixConfig{
|
cfg.GetUserConfig().Git.CommitPrefix = &config.CommitPrefixConfig{
|
||||||
Pattern: "^\\w+\\/(\\w+-\\w+).*",
|
Pattern: "^\\w+\\/(\\w+-\\w+).*",
|
||||||
Replace: "[$1]: ",
|
Replace: "[$1]: ",
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ var CommitWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Description: "Commit with defined config commitPrefixes",
|
Description: "Commit with defined config commitPrefixes",
|
||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(testConfig *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
testConfig.UserConfig.Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
cfg.GetUserConfig().Git.CommitPrefixes = map[string]config.CommitPrefixConfig{"repo": {Pattern: "^\\w+\\/(\\w+-\\w+).*", Replace: "[$1]: "}}
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("feature/TEST-001")
|
shell.NewBranch("feature/TEST-001")
|
||||||
|
@ -10,7 +10,7 @@ var Highlight = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "always"
|
config.GetAppState().GitLogShowGraph = "always"
|
||||||
config.GetUserConfig().Gui.AuthorColors = map[string]string{
|
config.GetUserConfig().Gui.AuthorColors = map[string]string{
|
||||||
"CI": "red",
|
"CI": "red",
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ var NewBranchWithPrefix = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.Git.BranchPrefix = "myprefix/"
|
cfg.GetUserConfig().Git.BranchPrefix = "myprefix/"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,8 +10,8 @@ var PasteCommitMessage = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.OS.CopyToClipboardCmd = "echo {{text}} > ../clipboard"
|
config.GetUserConfig().OS.CopyToClipboardCmd = "echo {{text}} > ../clipboard"
|
||||||
config.UserConfig.OS.ReadFromClipboardCmd = "cat ../clipboard"
|
config.GetUserConfig().OS.ReadFromClipboardCmd = "cat ../clipboard"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.EmptyCommit("subject\n\nbody 1st line\nbody 2nd line")
|
shell.EmptyCommit("subject\n\nbody 1st line\nbody 2nd line")
|
||||||
|
@ -10,8 +10,8 @@ var PasteCommitMessageOverExisting = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.OS.CopyToClipboardCmd = "echo {{text}} > ../clipboard"
|
config.GetUserConfig().OS.CopyToClipboardCmd = "echo {{text}} > ../clipboard"
|
||||||
config.UserConfig.OS.ReadFromClipboardCmd = "cat ../clipboard"
|
config.GetUserConfig().OS.ReadFromClipboardCmd = "cat ../clipboard"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.EmptyCommit("subject\n\nbody 1st line\nbody 2nd line")
|
shell.EmptyCommit("subject\n\nbody 1st line\nbody 2nd line")
|
||||||
|
@ -15,7 +15,7 @@ var AccessCommitProperties = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("my change")
|
shell.EmptyCommit("my change")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "commits",
|
Context: "commits",
|
||||||
|
@ -13,7 +13,7 @@ var BasicCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
|
@ -14,7 +14,7 @@ var CheckForConflicts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shared.MergeConflictsSetup(shell)
|
shared.MergeConflictsSetup(shell)
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "m",
|
Key: "m",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -13,7 +13,7 @@ var FormPrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
|
@ -13,7 +13,7 @@ var GlobalContext = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("my change")
|
shell.EmptyCommit("my change")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "global",
|
Context: "global",
|
||||||
|
@ -19,7 +19,7 @@ var MenuFromCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
NewBranch("feature/foo")
|
NewBranch("feature/foo")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -18,7 +18,7 @@ var MenuFromCommandsOutput = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
EmptyCommit("baz")
|
EmptyCommit("baz")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -13,7 +13,7 @@ var MultipleContexts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("my change")
|
shell.EmptyCommit("my change")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "commits, reflogCommits",
|
Context: "commits, reflogCommits",
|
||||||
|
@ -13,7 +13,7 @@ var MultiplePrompts = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
|
@ -13,7 +13,7 @@ var SelectedCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.CreateNCommits(3)
|
shell.CreateNCommits(3)
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "global",
|
Context: "global",
|
||||||
|
@ -17,7 +17,7 @@ var SelectedPath = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.CreateFile("folder2/file2", "")
|
shell.CreateFile("folder2/file2", "")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "global",
|
Context: "global",
|
||||||
|
@ -15,7 +15,7 @@ var ShowOutputInPanel = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("my change")
|
shell.EmptyCommit("my change")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "commits",
|
Context: "commits",
|
||||||
|
@ -20,7 +20,7 @@ var SuggestionsCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -20,7 +20,7 @@ var SuggestionsPreset = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
},
|
},
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -12,7 +12,7 @@ var AmendOldCommit = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
IsDemo: true,
|
IsDemo: true,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
setDefaultDemoConfig(config)
|
setDefaultDemoConfig(config)
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.CreateNCommitsWithRandomMessages(60)
|
shell.CreateNCommitsWithRandomMessages(60)
|
||||||
|
@ -26,7 +26,7 @@ var CustomCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
setDefaultDemoConfig(cfg)
|
setDefaultDemoConfig(cfg)
|
||||||
|
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "a",
|
Key: "a",
|
||||||
Context: "localBranches",
|
Context: "localBranches",
|
||||||
|
@ -13,8 +13,8 @@ var DiffCommits = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
setDefaultDemoConfig(config)
|
setDefaultDemoConfig(config)
|
||||||
|
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
config.UserConfig.Gui.ShowCommandLog = false
|
config.GetUserConfig().Gui.ShowCommandLog = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.CreateNCommitsWithRandomMessages(50)
|
shell.CreateNCommitsWithRandomMessages(50)
|
||||||
|
@ -12,7 +12,7 @@ var NukeWorkingTree = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
IsDemo: true,
|
IsDemo: true,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
setDefaultDemoConfig(config)
|
setDefaultDemoConfig(config)
|
||||||
config.UserConfig.Gui.AnimateExplosion = true
|
config.GetUserConfig().Gui.AnimateExplosion = true
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.EmptyCommit("blah")
|
shell.EmptyCommit("blah")
|
||||||
|
@ -4,7 +4,7 @@ import "github.com/jesseduffield/lazygit/pkg/config"
|
|||||||
|
|
||||||
// Gives us nicer colours when we generate a git repo history with `shell.CreateRepoHistory()`
|
// Gives us nicer colours when we generate a git repo history with `shell.CreateRepoHistory()`
|
||||||
func setGeneratedAuthorColours(config *config.AppConfig) {
|
func setGeneratedAuthorColours(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.AuthorColors = map[string]string{
|
config.GetUserConfig().Gui.AuthorColors = map[string]string{
|
||||||
"Fredrica Greenhill": "#fb5aa3",
|
"Fredrica Greenhill": "#fb5aa3",
|
||||||
"Oscar Reuenthal": "#86c82f",
|
"Oscar Reuenthal": "#86c82f",
|
||||||
"Paul Oberstein": "#ffd500",
|
"Paul Oberstein": "#ffd500",
|
||||||
@ -15,5 +15,5 @@ func setGeneratedAuthorColours(config *config.AppConfig) {
|
|||||||
|
|
||||||
func setDefaultDemoConfig(config *config.AppConfig) {
|
func setDefaultDemoConfig(config *config.AppConfig) {
|
||||||
// demos look much nicers with icons shown
|
// demos look much nicers with icons shown
|
||||||
config.UserConfig.Gui.NerdFontsVersion = "3"
|
config.GetUserConfig().Gui.NerdFontsVersion = "3"
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@ var StageLines = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
IsDemo: true,
|
IsDemo: true,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
setDefaultDemoConfig(config)
|
setDefaultDemoConfig(config)
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
config.UserConfig.Gui.ShowCommandLog = false
|
config.GetUserConfig().Gui.ShowCommandLog = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("docs-fix")
|
shell.NewBranch("docs-fix")
|
||||||
|
@ -17,7 +17,7 @@ var CopyMenu = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.OS.CopyToClipboardCmd = "echo {{text}} > clipboard"
|
config.GetUserConfig().OS.CopyToClipboardCmd = "echo {{text}} > clipboard"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -10,7 +10,7 @@ var FilterFuzzy = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.FilterMode = "fuzzy"
|
config.GetUserConfig().Gui.FilterMode = "fuzzy"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("this-is-my-branch")
|
shell.NewBranch("this-is-my-branch")
|
||||||
|
@ -10,7 +10,7 @@ var FilterMenuWithNoKeybindings = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Keybinding.Universal.ToggleWhitespaceInDiffView = "<disabled>"
|
config.GetUserConfig().Keybinding.Universal.ToggleWhitespaceInDiffView = "<disabled>"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,7 @@ var SelectAuthor = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
commonSetup(shell)
|
commonSetup(shell)
|
||||||
|
@ -11,7 +11,7 @@ var DontShowBranchHeadsForTodoItems = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -11,7 +11,7 @@ var DropCommitInCopiedBranchWithUpdateRef = NewIntegrationTest(NewIntegrationTes
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -12,7 +12,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -11,7 +11,7 @@ var InteractiveRebaseOfCopiedBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -12,7 +12,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -12,7 +12,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
config.GetUserConfig().Git.MainBranches = []string{"master"}
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,7 +10,7 @@ var ShowExecTodos = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "X",
|
Key: "X",
|
||||||
Context: "commits",
|
Context: "commits",
|
||||||
|
@ -11,7 +11,7 @@ var ViewFilesOfTodoEntries = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
GitVersion: AtLeast("2.38.0"),
|
GitVersion: AtLeast("2.38.0"),
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.
|
shell.
|
||||||
|
@ -10,7 +10,7 @@ var ConfirmOnQuit = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.ConfirmOnQuit = true
|
config.GetUserConfig().ConfirmOnQuit = true
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -12,7 +12,7 @@ var CopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.OS.CopyToClipboardCmd = "echo {{text}} > clipboard"
|
config.GetUserConfig().OS.CopyToClipboardCmd = "echo {{text}} > clipboard"
|
||||||
},
|
},
|
||||||
|
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
|
@ -10,10 +10,10 @@ var DisabledKeybindings = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Keybinding.Universal.PrevItem = "<disabled>"
|
config.GetUserConfig().Keybinding.Universal.PrevItem = "<disabled>"
|
||||||
config.UserConfig.Keybinding.Universal.NextItem = "<disabled>"
|
config.GetUserConfig().Keybinding.Universal.NextItem = "<disabled>"
|
||||||
config.UserConfig.Keybinding.Universal.NextTab = "<up>"
|
config.GetUserConfig().Keybinding.Universal.NextTab = "<up>"
|
||||||
config.UserConfig.Keybinding.Universal.PrevTab = "<down>"
|
config.GetUserConfig().Keybinding.Universal.PrevTab = "<down>"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -10,7 +10,7 @@ var InitialOpen = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.DisableStartupPopups = false
|
config.GetUserConfig().DisableStartupPopups = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -10,7 +10,7 @@ var DoNotShowBranchMarkersInReflogSubcommits = NewIntegrationTest(NewIntegration
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.AppState.GitLogShowGraph = "never"
|
config.GetAppState().GitLogShowGraph = "never"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.NewBranch("branch1")
|
shell.NewBranch("branch1")
|
||||||
|
@ -10,8 +10,8 @@ var LogCmd = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Git.AllBranchesLogCmd = `echo "view1"`
|
config.GetUserConfig().Git.AllBranchesLogCmd = `echo "view1"`
|
||||||
config.UserConfig.Git.AllBranchesLogCmds = []string{`echo "view2"`}
|
config.GetUserConfig().Git.AllBranchesLogCmds = []string{`echo "view2"`}
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -10,7 +10,7 @@ var ShowDivergenceFromBaseBranch = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
config.GetUserConfig().Gui.ShowDivergenceFromBaseBranch = "arrowAndNumber"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.CreateNCommits(2)
|
shell.CreateNCommits(2)
|
||||||
|
@ -10,7 +10,7 @@ var Enter = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "e",
|
Key: "e",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
|
@ -10,7 +10,7 @@ var Reset = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "e",
|
Key: "e",
|
||||||
Context: "files",
|
Context: "files",
|
||||||
|
@ -13,7 +13,7 @@ var KeybindingSuggestionsWhenSwitchingRepos = NewIntegrationTest(NewIntegrationT
|
|||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
otherRepo, _ := filepath.Abs("../other")
|
otherRepo, _ := filepath.Abs("../other")
|
||||||
config.AppState.RecentRepos = []string{otherRepo}
|
config.GetAppState().RecentRepos = []string{otherRepo}
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
shell.CloneNonBare("other")
|
shell.CloneNonBare("other")
|
||||||
|
@ -10,7 +10,7 @@ var OpenLinkFailure = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.OS.OpenLink = "exit 42"
|
config.GetUserConfig().OS.OpenLink = "exit 42"
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {},
|
SetupRepo: func(shell *Shell) {},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
@ -15,7 +15,7 @@ var BareRepoWorktreeConfig = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{"--git-dir={{.actualPath}}/.bare"},
|
ExtraCmdArgs: []string{"--git-dir={{.actualPath}}/.bare"},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
// we're going to have a directory structure like this:
|
// we're going to have a directory structure like this:
|
||||||
|
@ -10,7 +10,7 @@ var CustomCommand = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(cfg *config.AppConfig) {
|
SetupConfig: func(cfg *config.AppConfig) {
|
||||||
cfg.UserConfig.CustomCommands = []config.CustomCommand{
|
cfg.GetUserConfig().CustomCommands = []config.CustomCommand{
|
||||||
{
|
{
|
||||||
Key: "d",
|
Key: "d",
|
||||||
Context: "worktrees",
|
Context: "worktrees",
|
||||||
|
@ -13,7 +13,7 @@ var DoubleNestedLinkedSubmodule = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
// we're going to have a directory structure like this:
|
// we're going to have a directory structure like this:
|
||||||
|
@ -10,7 +10,7 @@ var SymlinkIntoRepoSubdir = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
ExtraCmdArgs: []string{},
|
ExtraCmdArgs: []string{},
|
||||||
Skip: false,
|
Skip: false,
|
||||||
SetupConfig: func(config *config.AppConfig) {
|
SetupConfig: func(config *config.AppConfig) {
|
||||||
config.UserConfig.Gui.ShowFileTree = false
|
config.GetUserConfig().Gui.ShowFileTree = false
|
||||||
},
|
},
|
||||||
SetupRepo: func(shell *Shell) {
|
SetupRepo: func(shell *Shell) {
|
||||||
// we're going to have a directory structure like this:
|
// we're going to have a directory structure like this:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user