mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-06 23:46:13 +02:00
Add config param that displays the whole git graph by default
This commit is contained in:
parent
8fd9dea641
commit
666180cfd0
@ -75,6 +75,8 @@ git:
|
|||||||
# one of always, never, when-maximised
|
# one of always, never, when-maximised
|
||||||
# this determines whether the git graph is rendered in the commits panel
|
# this determines whether the git graph is rendered in the commits panel
|
||||||
showGraph: 'when-maximised'
|
showGraph: 'when-maximised'
|
||||||
|
# displays the whole git graph by default in the commits panel
|
||||||
|
showWholeGraph: false
|
||||||
skipHookPrefix: WIP
|
skipHookPrefix: WIP
|
||||||
autoFetch: true
|
autoFetch: true
|
||||||
autoRefresh: true
|
autoRefresh: true
|
||||||
|
@ -106,6 +106,7 @@ type MergingConfig struct {
|
|||||||
type LogConfig struct {
|
type LogConfig struct {
|
||||||
Order string `yaml:"order"` // one of date-order, author-date-order, topo-order
|
Order string `yaml:"order"` // one of date-order, author-date-order, topo-order
|
||||||
ShowGraph string `yaml:"showGraph"` // one of always, never, when-maximised
|
ShowGraph string `yaml:"showGraph"` // one of always, never, when-maximised
|
||||||
|
ShowWholeGraph bool `yaml:"showWholeGraph"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommitPrefixConfig struct {
|
type CommitPrefixConfig struct {
|
||||||
@ -385,6 +386,7 @@ func GetDefaultConfig() *UserConfig {
|
|||||||
Log: LogConfig{
|
Log: LogConfig{
|
||||||
Order: "topo-order",
|
Order: "topo-order",
|
||||||
ShowGraph: "when-maximised",
|
ShowGraph: "when-maximised",
|
||||||
|
ShowWholeGraph: false,
|
||||||
},
|
},
|
||||||
SkipHookPrefix: "WIP",
|
SkipHookPrefix: "WIP",
|
||||||
AutoFetch: true,
|
AutoFetch: true,
|
||||||
|
@ -24,7 +24,7 @@ func NewLocalCommitsContext(
|
|||||||
|
|
||||||
c *types.HelperCommon,
|
c *types.HelperCommon,
|
||||||
) *LocalCommitsContext {
|
) *LocalCommitsContext {
|
||||||
viewModel := NewLocalCommitsViewModel(getModel)
|
viewModel := NewLocalCommitsViewModel(getModel, c)
|
||||||
|
|
||||||
return &LocalCommitsContext{
|
return &LocalCommitsContext{
|
||||||
LocalCommitsViewModel: viewModel,
|
LocalCommitsViewModel: viewModel,
|
||||||
@ -70,10 +70,11 @@ type LocalCommitsViewModel struct {
|
|||||||
showWholeGitGraph bool
|
showWholeGitGraph bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalCommitsViewModel(getModel func() []*models.Commit) *LocalCommitsViewModel {
|
func NewLocalCommitsViewModel(getModel func() []*models.Commit, c *types.HelperCommon) *LocalCommitsViewModel {
|
||||||
self := &LocalCommitsViewModel{
|
self := &LocalCommitsViewModel{
|
||||||
BasicViewModel: NewBasicViewModel(getModel),
|
BasicViewModel: NewBasicViewModel(getModel),
|
||||||
limitCommits: true,
|
limitCommits: true,
|
||||||
|
showWholeGitGraph: c.UserConfig.Git.Log.ShowWholeGraph,
|
||||||
}
|
}
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user