+
Skip to content

refactor: simplify MergeInto patch op #999

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

Merged
merged 2 commits into from
Jul 1, 2025
Merged

Conversation

woodruffw
Copy link
Member

This simplifies the MergeInto patch op a bit by reducing its scope and eliminating the need for any special-case top-level handling. It leaves the foo: i.e. empty mapping body case unimplemented, although now it'll fail with a more contextually appropriate error.

I also went ahead and removed two tests that appear to be duplicates of other tests, despite their names:

  • test_merge_into_with_shell_key
  • test_merge_into_key_reuse_with_different_value_types

@woodruffw woodruffw self-assigned this Jul 1, 2025
@woodruffw woodruffw added refactor Refactoring tasks autofix Auto-fix functionality labels Jul 1, 2025
@woodruffw
Copy link
Member Author

I thought through it a bit, and I think the easiest way to handle the foo: i.e. empty mapping case it to decompose it into a (Remove, Add) pair of operations. However to do that we'll need some other functional fixes to the Remove op, so I'm not doing that with this PR.

@woodruffw woodruffw merged commit ed0586a into main Jul 1, 2025
8 checks passed
@woodruffw woodruffw deleted the ww/refactor-mergeinto branch July 1, 2025 19:53
woodruffw added a commit that referenced this pull request Jul 1, 2025
mostafa added a commit to mostafa/zizmor that referenced this pull request Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autofix Auto-fix functionality refactor Refactoring tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载