Skip to content

Comments

options: add GITUI_CONFIG_DIR and --config-dir#2862

Open
amaanq wants to merge 1 commit intogitui-org:masterfrom
amaanq:global-options
Open

options: add GITUI_CONFIG_DIR and --config-dir#2862
amaanq wants to merge 1 commit intogitui-org:masterfrom
amaanq:global-options

Conversation

@amaanq
Copy link

@amaanq amaanq commented Feb 18, 2026

If gitui can't find a local .git/gitui.ron, it now falls back to gitui.ron in the config directory (~/.config/gitui/ by default). The config directory can be overridden with --config-dir / -c or the GITUI_CONFIG_DIR env var, which also affects where themes and key bindings are loaded from.

Both OptionsData and DiffOptions now derive #[serde(default)] so partial configs (e.g. only setting diff.ignore_whitespace) work without needing every field present.

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

If gitui can't find a local `.git/gitui.ron`, it now falls back to
`gitui.ron` in the config directory (`~/.config/gitui/` by default).
The config directory can be overridden with `--config-dir` / `-c` or
the `GITUI_CONFIG_DIR` env var, which also affects where themes and
key bindings are loaded from.

Both `OptionsData` and `DiffOptions` now derive `#[serde(default)]`
so partial configs (e.g. only setting `diff.ignore_whitespace`) work
without needing every field present.

Supersedes gitui-org#2207, fixes gitui-org#2140.
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 this pull request may close these issues.

Configuration file support

1 participant