Skip to content
This repository was archived by the owner on Aug 18, 2026. It is now read-only.

feat(sui-tools): switch edit tool to unified diffs - #36

Merged
pranc1ngpegasus merged 8 commits into
mainfrom
agent/unified-diff-edit
Aug 14, 2026
Merged

feat(sui-tools): switch edit tool to unified diffs#36
pranc1ngpegasus merged 8 commits into
mainfrom
agent/unified-diff-edit

Conversation

@pranc1ngpegasus

Copy link
Copy Markdown
Member

What changed

  • Replaced SEARCH/REPLACE editing with single-file Git unified diff input.
  • Validate unified diff syntax and hunk line counts with gitpatch.
  • Persist a 0600 write-ahead patch, run git apply --check, then git apply.
  • Support /dev/null create/delete diffs and reject renames, multi-file patches, and worktree-external paths.
  • Centralize the gitpatch dependency in workspace dependencies.

Why

The edit tool now uses the same patch format as Git, making hunk boundaries explicit and allowing Git to perform the final safe application.

Validation

  • cargo test -p sui-tools (52 tests + doctest)
  • cargo clippy -p sui-tools --all-targets -- -D warnings
  • cargo check --workspace
  • git diff --check

@pranc1ngpegasus
pranc1ngpegasus force-pushed the agent/unified-diff-edit branch from 12e1376 to 83c382d Compare August 14, 2026 04:53
@pranc1ngpegasus
pranc1ngpegasus force-pushed the agent/unified-diff-edit branch from c16b27b to 555e0e7 Compare August 14, 2026 05:37
@pranc1ngpegasus
pranc1ngpegasus marked this pull request as ready for review August 14, 2026 05:59
@pranc1ngpegasus
pranc1ngpegasus merged commit eef9469 into main Aug 14, 2026
1 check passed
@pranc1ngpegasus
pranc1ngpegasus deleted the agent/unified-diff-edit branch August 14, 2026 05:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant