Skip to content

fix: prevent spurious [commit] header in config migration#834

Merged
max-sixty merged 1 commit intomainfrom
config-diff
Jan 24, 2026
Merged

fix: prevent spurious [commit] header in config migration#834
max-sixty merged 1 commit intomainfrom
config-diff

Conversation

@max-sixty
Copy link
Owner

Summary

  • Fixes bug where config migration created spurious [commit] section header at end of file
  • Uses set_implicit(true) to suppress empty parent table headers in toml_edit
  • Adds snapshot tests showing unified diffs of migration output

Test plan

  • Unit tests pass (68 deprecation tests)
  • Integration tests pass (939 tests)
  • Verified fix on actual user config file

🤖 Generated with Claude Code

When migrating [commit-generation] to [commit.generation], the migration
was incorrectly creating an empty [commit] section header at the end of
the config file.

The fix uses toml_edit's set_implicit(true) on the parent commit table
to suppress the redundant header rendering.

Adds snapshot tests showing unified diffs of the migration output.

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit 3700461 into main Jan 24, 2026
21 checks passed
@max-sixty max-sixty deleted the config-diff branch January 24, 2026 22:22
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.

1 participant