Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save git.log.showGraph and git.log.order in state.yml instead of config.yml #3166

Closed
stefanhaller opened this issue Dec 17, 2023 · 0 comments · Fixed by #3197
Closed

Save git.log.showGraph and git.log.order in state.yml instead of config.yml #3166

stefanhaller opened this issue Dec 17, 2023 · 0 comments · Fixed by #3197
Labels
enhancement New feature or request

Comments

@stefanhaller
Copy link
Collaborator

showGraph is a setting that can be configured through config.yml, but it can also be toggled at runtime with the <c-l> menu. This dynamically changed value is not saved anywhere though, the next time lazygit starts it reverts back to the value from config.yml.

We should change this so that there's no config setting, only the menu, and its value is saved in state.yml. We did the same change for the diff context size in #2969, and we follow the same pattern for the "ignore whitespace" setting. In general, we should follow this pattern for more things if possible; it makes it easier for people to change settings (editing the config file is cumbersome), and they don't have to quit and restart for the change to take effect.

The same goes for the git.log.order config.

One challenge here is how to migrate people's existing configs. For the diff context size we didn't bother, because it didn't seem like a big deal if people's diff context size reverted back to 3 once; but for showGraph and commit sort order this would be more important, because users could be confused why their graph is no longer showing. This is a bit tricky to do (but not impossible).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant