-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate git.log.showGraph and git.log.order to app state
- Loading branch information
Showing
12 changed files
with
240 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package config | ||
|
||
// AppState stores data between runs of the app like when the last update check | ||
// was performed and which other repos have been checked out | ||
type AppState struct { | ||
LastUpdateCheck int64 | ||
RecentRepos []string | ||
StartupPopupVersion int | ||
|
||
// these are for custom commands typed in directly, not for custom commands in the lazygit config | ||
CustomCommandsHistory []string | ||
HideCommandLog bool | ||
IgnoreWhitespaceInDiffView bool | ||
DiffContextSize int | ||
LocalBranchSortOrder string | ||
RemoteBranchSortOrder string | ||
|
||
// One of: 'date-order' | 'author-date-order' | 'topo-order | default' | ||
// 'topo-order' makes it easier to read the git log graph, but commits may not | ||
// appear chronologically. See https://git-scm.com/docs/ | ||
GitLogOrder string | ||
|
||
// This determines whether the git graph is rendered in the commits panel | ||
// One of 'always' | 'never' | 'when-maximised' | ||
GitLogShowGraph string | ||
} | ||
|
||
func GetDefaultAppState() *AppState { | ||
return &AppState{ | ||
LastUpdateCheck: 0, | ||
RecentRepos: []string{}, | ||
StartupPopupVersion: 0, | ||
DiffContextSize: 3, | ||
LocalBranchSortOrder: "recency", | ||
RemoteBranchSortOrder: "alphabetical", | ||
GitLogOrder: "topo-order", | ||
GitLogShowGraph: "when-maximised", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.