Skip to content

fix(git): preserve full diff hunk headers#993

Merged
aeppling merged 1 commit intortk-ai:developfrom
em0t:fix/git-diff-hunk-context
Apr 3, 2026
Merged

fix(git): preserve full diff hunk headers#993
aeppling merged 1 commit intortk-ai:developfrom
em0t:fix/git-diff-hunk-context

Conversation

@em0t
Copy link
Copy Markdown
Contributor

@em0t em0t commented Apr 3, 2026

Summary

  • preserve the full unified diff hunk header in rtk git diff compact output instead of reconstructing it without trailing context
  • keep function / symbol context that appears after the second @@ marker
  • add regression coverage for hunk headers such as @@ -10,3 +10,4 @@ fn important_context() {

Minimal Case

Raw

@@ -10,3 +10,4 @@ fn important_context() {

Previous RTK

@@ -10,3 +10,4 @@

This PR

@@ -10,3 +10,4 @@ fn important_context() {

Testing

  • cargo fmt --all
  • cargo clippy --all-targets
  • cargo test --all

Notes

  • cargo clippy --all-targets still reports pre-existing warnings outside this change set

@em0t em0t force-pushed the fix/git-diff-hunk-context branch from 69d3726 to 12d9c93 Compare April 3, 2026 09:36
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 3, 2026

CLA assistant check
All committers have signed the CLA.

@em0t em0t changed the base branch from master to develop April 3, 2026 09:36
@em0t em0t force-pushed the fix/git-diff-hunk-context branch from 12d9c93 to 3420929 Compare April 3, 2026 09:39
Signed-off-by: em0t <10153971+em0t@users.noreply.github.com>
@em0t em0t force-pushed the fix/git-diff-hunk-context branch from 3420929 to 09b3ff9 Compare April 3, 2026 10:09
@em0t
Copy link
Copy Markdown
Contributor Author

em0t commented Apr 3, 2026

Could a maintainer please approve and run workflows so CI can start for review?

@aeppling aeppling self-assigned this Apr 3, 2026
@aeppling aeppling added the awaiting-information Waiting for reporter to provide more info label Apr 3, 2026
@aeppling
Copy link
Copy Markdown
Contributor

aeppling commented Apr 3, 2026

Hello, valid & merged

Thanks for contributing

@aeppling aeppling merged commit 62f4452 into rtk-ai:develop Apr 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-information Waiting for reporter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants