Repository: jesseduffield/lazygit
File: pkg/config/user_config.go (Go)

Code before:
	Paging              PagingConfig                  `yaml:"paging"`
	Commit              CommitConfig                  `yaml:"commit"`
	Merging             MergingConfig                 `yaml:"merging"`
	MainBranches        []string                      `yaml:"mainBranches"`
	SkipHookPrefix      string                        `yaml:"skipHookPrefix"`
	AutoFetch           bool                          `yaml:"autoFetch"`
	AutoRefresh         bool                          `yaml:"autoRefresh"`
	FetchAll            bool                          `yaml:"fetchAll"`
	BranchLogCmd        string                        `yaml:"branchLogCmd"`
	AllBranchesLogCmd   string                        `yaml:"allBranchesLogCmd"`
	OverrideGpg         bool                          `yaml:"overrideGpg"`
	DisableForcePushing bool                          `yaml:"disableForcePushing"`
	CommitPrefixes      map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
	// this should really be under 'gui', not 'git'
	ParseEmoji      bool      `yaml:"parseEmoji"`
	Log             LogConfig `yaml:"log"`
	DiffContextSize int       `yaml:"diffContextSize"`
}

type PagingConfig struct {
	ColorArg            string `yaml:"colorArg"`
	Pager               string `yaml:"pager"`
	UseConfig           bool   `yaml:"useConfig"`
	ExternalDiffCommand string `yaml:"externalDiffCommand"`
}

type CommitConfig struct {
	SignOff bool `yaml:"signOff"`
}

type MergingConfig struct {
	ManualCommit bool   `yaml:"manualCommit"`
	Args         string `yaml:"args"`
}

type LogConfig struct {
	Order          string `yaml:"order"`     // one of date-order, author-date-order, topo-order
	ShowGraph      string `yaml:"showGraph"` // one of always, never, when-maximised
	ShowWholeGraph bool   `yaml:"showWholeGraph"`
}

type CommitPrefixConfig struct {
	Pattern string `yaml:"pattern"`
	Replace string `yaml:"replace"`
}

type UpdateConfig struct {
	Method string `yaml:"method"`
	Days   int64  `yaml:"days"`
}


Review comment (suggestion):
I wasn't sure if this should go as a subkey of `pager` or outside of it. It's not technically related to pagers, but from a user's point of view it's conceptually similar. Also, if we later decide to have an array of pagers so that you can cycle through them with a keybinding, having it inside of `pager` will make this easier.

Code after:

type GitConfig struct {
	Paging              PagingConfig                  `yaml:"paging"`
	Commit              CommitConfig                  `yaml:"commit"`
	Merging             MergingConfig                 `yaml:"merging"`
	MainBranches        []string                      `yaml:"mainBranches"`
	SkipHookPrefix      string                        `yaml:"skipHookPrefix"`
	AutoFetch           bool                          `yaml:"autoFetch"`
	AutoRefresh         bool                          `yaml:"autoRefresh"`
	FetchAll            bool                          `yaml:"fetchAll"`
	BranchLogCmd        string                        `yaml:"branchLogCmd"`
	AllBranchesLogCmd   string                        `yaml:"allBranchesLogCmd"`
	OverrideGpg         bool                          `yaml:"overrideGpg"`
	DisableForcePushing bool                          `yaml:"disableForcePushing"`
	CommitPrefixes      map[string]CommitPrefixConfig `yaml:"commitPrefixes"`
	// this should really be under 'gui', not 'git'
	ParseEmoji      bool      `yaml:"parseEmoji"`
	Log             LogConfig `yaml:"log"`
	DiffContextSize int       `yaml:"diffContextSize"`
}

type PagingConfig struct {
	ColorArg            string `yaml:"colorArg"`
	Pager               string `yaml:"pager"`
	UseConfig           bool   `yaml:"useConfig"`
	ExternalDiffCommand string `yaml:"externalDiffCommand"`
}

type CommitConfig struct {
	SignOff bool `yaml:"signOff"`
}

type MergingConfig struct {
	ManualCommit bool   `yaml:"manualCommit"`
	Args         string `yaml:"args"`
}

type LogConfig struct {
	Order          string `yaml:"order"`     // one of date-order, author-date-order, topo-order
	ShowGraph      string `yaml:"showGraph"` // one of always, never, when-maximised
	ShowWholeGraph bool   `yaml:"showWholeGraph"`
}

type CommitPrefixConfig struct {
	Pattern string `yaml:"pattern"`
	Replace string `yaml:"replace"`
}

type UpdateConfig struct {
	Method string `yaml:"method"`
	Days   int64  `yaml:"days"`