Skip to content

Track explicitly set config options to enable overriding machine-wide defaults#286

Draft
Copilot wants to merge 1 commit intomasterfrom
copilot/allow-config-overrides-default
Draft

Track explicitly set config options to enable overriding machine-wide defaults#286
Copilot wants to merge 1 commit intomasterfrom
copilot/allow-config-overrides-default

Conversation

Copy link
Contributor

Copilot AI commented Feb 6, 2026

Config options at default values were not persisted to disk. When machine-wide config sets non-default values, users cannot override back to defaults since user config files omit default-valued options.

Changes

  • Added _explicitlySetOptions HashSet to track options set via SetOption() or loaded from config files
  • Modified save logic in ToIniData() to persist tracked options even when at default values
  • Updated ResetOption() to remove options from tracking, allowing inheritance from machine-wide config

Usage

# Override machine-wide network_use=minimal back to default
0install config network_use full

# Remove user override, inherit from machine-wide
0install config network_use default

The tracking mechanism distinguishes between:

  • Unset options (inherit from machine-wide)
  • Explicitly set to default (override machine-wide)

Added tests covering machine-wide override scenarios, persistence across save/load cycles, and reset behavior.

Original prompt

This section details on the original issue you should resolve

<issue_title>Allow overriding machine-wide config options back to default</issue_title>
<issue_description>Currently, when a config option is set to it's default value, the value is not persisted on disk. This works fine, unless a non-default value is set in the machine-wide config. Find a way to solve this.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Allow overriding machine-wide config options back to default Track explicitly set config options to enable overriding machine-wide defaults Feb 6, 2026
Copilot AI requested a review from bastianeicher February 6, 2026 18:49
…ptions to defaults

Co-authored-by: bastianeicher <414366+bastianeicher@users.noreply.github.com>
@bastianeicher bastianeicher force-pushed the copilot/allow-config-overrides-default branch from 9d5aab4 to ecae0e5 Compare February 11, 2026 14:36
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.

Allow overriding machine-wide config options back to default

2 participants

Comments