diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-02-13 14:41:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 14:41:01 +0100 |
commit | beb730a9e6f9113db3cb22b222f4858f95dc4d55 (patch) | |
tree | d5b1f706348913b0e0632ee62f8d72dbe28960ac | |
parent | 0c5212ae0b5b9f46602b480d5dd4609685ae5806 (diff) | |
parent | b1d05b6371192bbbe54ea7e094594b17b92082f1 (diff) |
Change default of git.log.showGraph to 'always' (#3314)
Change default of git.log.showGraph to 'always'; most people seem to
prefer it to be on.
Fixes #3312.
11 files changed, 21 insertions, 8 deletions
diff --git a/docs/Config.md b/docs/Config.md index 312fd77f2..04bfbbc40 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -104,7 +104,7 @@ git: order: 'topo-order' # one of always, never, when-maximised # this determines whether the git graph is rendered in the commits panel - showGraph: 'when-maximised' + showGraph: 'always' # displays the whole git graph by default in the commits panel (equivalent to passing the `--all` argument to `git log`) showWholeGraph: false skipHookPrefix: WIP diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 0069c75b0..916b6dc90 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -662,7 +662,7 @@ func GetDefaultConfig() *UserConfig { }, Log: LogConfig{ Order: "topo-order", - ShowGraph: "when-maximised", + ShowGraph: "always", ShowWholeGraph: false, }, SkipHookPrefix: "WIP", diff --git a/pkg/integration/tests/bisect/basic.go b/pkg/integration/tests/bisect/basic.go index 1dfe6368b..7e34e908f 100644 --- a/pkg/integration/tests/bisect/basic.go +++ b/pkg/integration/tests/bisect/basic.go @@ -14,7 +14,9 @@ var Basic = NewIntegrationTest(NewIntegrationTestArgs{ NewBranch("mybranch"). CreateNCommits(10) }, - SetupConfig: func(cfg *config.AppConfig) {}, + SetupConfig: func(cfg *config.AppConfig) { + cfg.UserConfig.Git.Log.ShowGraph = "never" + }, Run: func(t *TestDriver, keys config.KeybindingConfig) { markCommitAsBad := func() { t.Views().Commits(). diff --git a/pkg/integration/tests/bisect/choose_terms.go b/pkg/integration/tests/bisect/choose_terms.go index 825c8f5e2..660204f98 100644 --- a/pkg/integration/tests/bisect/choose_terms.go +++ b/pkg/integration/tests/bisect/choose_terms.go @@ -14,7 +14,9 @@ var ChooseTerms = NewIntegrationTest(NewIntegrationTestArgs{ NewBranch("mybranch"). CreateNCommits(10) }, - SetupConfig: func(cfg *config.AppConfig) {}, + SetupConfig: func(cfg *config.AppConfig) { + cfg.UserConfig.Git.Log.ShowGraph = "never" + }, Run: func(t *TestDriver, keys config.KeybindingConfig) { markCommitAsFixed := func() { t.Views().Commits(). diff --git a/pkg/integration/tests/bisect/skip.go b/pkg/integration/tests/bisect/skip.go index 998e82361..ff4c5c1b2 100644 --- a/pkg/integration/tests/bisect/skip.go +++ b/pkg/integration/tests/bisect/skip.go @@ -13,7 +13,9 @@ var Skip = NewIntegrationTest(NewIntegrationTestArgs{ shell. CreateNCommits(10) }, - SetupConfig: func(cfg *config.AppConfig) {}, + SetupConfig: func(cfg *config.AppConfig) { + cfg.UserConfig.Git.Log.ShowGraph = "never" + }, Run: func(t *TestDriver, keys config.KeybindingConfig) { t.Views().Commits(). Focus(). diff --git a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go index caeb7bfe0..5dd6839a2 100644 --- a/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go +++ b/pkg/integration/tests/cherry_pick/cherry_pick_during_rebase.go @@ -9,7 +9,9 @@ var CherryPickDuringRebase = NewIntegrationTest(NewIntegrationTestArgs{ Description: "Cherry pick commits from the subcommits view during a rebase", ExtraCmdArgs: []string{}, Skip: false, - SetupConfig: func(config *config.AppConfig) {}, + SetupConfig: func(config *config.AppConfig) { + config.UserConfig.Git.Log.ShowGraph = "never" + }, SetupRepo: func(shell *Shell) { shell. EmptyCommit("base"). diff --git a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go index de085710a..659df22c6 100644 --- a/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go +++ b/pkg/integration/tests/interactive_rebase/drop_todo_commit_with_update_ref.go @@ -12,6 +12,7 @@ var DropTodoCommitWithUpdateRef = NewIntegrationTest(NewIntegrationTestArgs{ GitVersion: AtLeast("2.38.0"), SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().Git.MainBranches = []string{"master"} + config.UserConfig.Git.Log.ShowGraph = "never" }, SetupRepo: func(shell *Shell) { shell. diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go index 4589d010d..82d07ce2a 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection.go @@ -12,6 +12,7 @@ var QuickStartKeepSelection = NewIntegrationTest(NewIntegrationTestArgs{ GitVersion: AtLeast("2.38.0"), SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().Git.MainBranches = []string{"master"} + config.UserConfig.Git.Log.ShowGraph = "never" }, SetupRepo: func(shell *Shell) { shell. diff --git a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go index 1b1039cf7..ec3173504 100644 --- a/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go +++ b/pkg/integration/tests/interactive_rebase/quick_start_keep_selection_range.go @@ -12,6 +12,7 @@ var QuickStartKeepSelectionRange = NewIntegrationTest(NewIntegrationTestArgs{ GitVersion: AtLeast("2.38.0"), SetupConfig: func(config *config.AppConfig) { config.GetUserConfig().Git.MainBranches = []string{"master"} + config.UserConfig.Git.Log.ShowGraph = "never" }, SetupRepo: func(shell *Shell) { shell. diff --git a/pkg/integration/tests/reflog/do_not_show_branch_markers_in_reflog_subcommits.go b/pkg/integration/tests/reflog/do_not_show_branch_markers_in_reflog_subcommits.go index 8e888c95a..b27b97316 100644 --- a/pkg/integration/tests/reflog/do_not_show_branch_markers_in_reflog_subcommits.go +++ b/pkg/integration/tests/reflog/do_not_show_branch_markers_in_reflog_subcommits.go @@ -9,7 +9,9 @@ var DoNotShowBranchMarkersInReflogSubcommits = NewIntegrationTest(NewIntegration Description: "Verify that no branch heads are shown in the subcommits view of a reflog entry", ExtraCmdArgs: []string{}, Skip: false, - SetupConfig: func(config *config.AppConfig) {}, + SetupConfig: func(config *config.AppConfig) { + config.UserConfig.Git.Log.ShowGraph = "never" + }, SetupRepo: func(shell *Shell) { shell.NewBranch("branch1") shell.EmptyCommit("one") diff --git a/schema/config.json b/schema/config.json index 92ee774df..0a78da23a 100644 --- a/schema/config.json +++ b/schema/config.json @@ -530,7 +530,7 @@ "when-maximised" ], "description": "This determines whether the git graph is rendered in the commits panel\nOne of 'always' | 'never' | 'when-maximised'", - "default": "when-maximised" + "default": "always" }, "showWholeGraph": { "type": "boolean", |