Skip to content

[Feature Request] smart config loading #570

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

Closed
dm9pZCAq opened this issue Mar 5, 2021 · 1 comment · Fixed by #589
Closed

[Feature Request] smart config loading #570

dm9pZCAq opened this issue Mar 5, 2021 · 1 comment · Fixed by #589
Milestone

Comments

@dm9pZCAq
Copy link
Contributor

dm9pZCAq commented Mar 5, 2021

I'm always frustrated when i update gitui and new key bindings or theme properties are added and because of this ALL keys and themes are set to default values

i see several solutions:

  1. automatically update config/theme when new setting added
  2. more verbose (maybe in message box inside gitui or just to stderr) say to user that new config added or something missing (with key bindings, you can find at least some messages in logs but with themes there is no messages)
  3. load settings that can be loaded and set the missing properties to defaults
@extrawurst extrawurst added this to the v0.13 milestone Mar 8, 2021
@extrawurst
Copy link
Collaborator

So the pending PR improves diagnostics by printing messages like:

Theme loading error: missing field `selected_tab`
 Old file was renamed to "/Users/stephan/.config/gitui/theme.ron.old".
 Defaults loaded and saved as "/Users/stephan/.config/gitui/theme.ron"

or

KeyConfig loading error: missing field `diff_stage_lines`
 Old config was renamed to "/Users/stephan/.config/gitui/key_config.ron.old".
 Default config loaded and saved as "/Users/stephan/.config/gitui/key_config.ron"

into stderr. it will still boot up using the default configs when something goes wrong. but it should be easier to diagnose and fix thanks to this

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

Successfully merging a pull request may close this issue.

2 participants