Skip to content

Copy selected diff rows as a git patch - #21

Open
siegfriedpammer wants to merge 1 commit into
mainfrom
copy-selection-as-git-diff
Open

siegfriedpammer wants to merge 1 commit into
mainfrom
copy-selection-as-git-diff

Conversation

@siegfriedpammer

Copy link
Copy Markdown
Member

Summary

  • add a diff context-menu action to copy the current selection as a git-style patch
  • include file headers, rename headers, and hunk ranges for the selected rendered diff rows
  • enable the action only for real diff documents with a non-empty selection

Verification

  • OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet build Stampeded.slnx

A reviewer often wants to carry a small selected region out of Stampeded into another tool without copying the whole file diff. The context menu now turns the selected rendered diff rows back into a minimal git-style patch, keeping path and range headers so the clipboard content can be applied or shared directly.

Assisted-by: OpenCode:gpt-5.5:OpenCode
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