Skip to content

feat: expose patch operation API#6

Merged
ThomasRooney merged 1 commit into
mainfrom
feat/patch-operations-api
May 21, 2026
Merged

feat: expose patch operation API#6
ThomasRooney merged 1 commit into
mainfrom
feat/patch-operations-api

Conversation

@ThomasRooney
Copy link
Copy Markdown
Member

Summary

  • add a public patch operation API for parsing and applying multi-file git patchsets against an in-memory content tree
  • support create, delete, rename, copy, modify, mode-change classification, and binary detection
  • move patchset application to a Git-like two-phase model so copy/rename preimages come from the original tree while normal edits compose against prior edits
  • validate invalid Git patch header combinations and inconsistent hunk filenames
  • add upstream-derived parity fixtures from git.git t4102 and t4112, plus negative cases from t4133/t4136

Checks

  • go test ./...
  • go test -tags parity ./...
  • go test -race -count=1 ./...
  • go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0 run

Note: the installed golangci-lint binary was built with Go 1.25 and panics on Go 1.26 sources, so I ran the same v2.4.0 linter via go run using the active Go 1.26 toolchain.

@ThomasRooney ThomasRooney changed the title Expose patch operation API feat: expose patch operation API May 21, 2026
@ThomasRooney ThomasRooney force-pushed the feat/patch-operations-api branch 2 times, most recently from d5d31b4 to eb2b162 Compare May 21, 2026 12:47
@ThomasRooney ThomasRooney force-pushed the feat/patch-operations-api branch from eb2b162 to 7eeef7e Compare May 21, 2026 12:51
@ThomasRooney ThomasRooney merged commit a91358f into main May 21, 2026
3 checks passed
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