Skip to content

fix: skip diff generation for tag pushes#255

Merged
coopernetes merged 1 commit into
mainfrom
fix/tag-push-null-sha-diff
May 13, 2026
Merged

fix: skip diff generation for tag pushes#255
coopernetes merged 1 commit into
mainfrom
fix/tag-push-null-sha-diff

Conversation

@coopernetes
Copy link
Copy Markdown
Member

Summary

  • Skip diff generation in DiffGenerationHook (store-and-forward) when the pushed ref is under refs/tags/
  • Skip diff generation in ScanDiffFilter (transparent proxy) via the existing isTagPush() check on GitRequestDetails
  • Add DiffGenerationHookTest covering branch push, tag push skip, and delete skip
  • Add tagPush_skipsDiffGeneration test to ScanDiffFilterTest

Closes #240

Test plan

  • ./gradlew :git-proxy-java-core:test passes
  • Push a release tag through the proxy and confirm no diff record is created

Tag pushes send a null old SHA (all zeros), which caused the proxy to
diff the entire repository history — producing 67K+ line diffs for a
simple release tag push.

Skip diff generation in both paths when the pushed ref is under
refs/tags/: a tag is just a pointer to a commit already reviewed
when it landed on the branch.

closes #240

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coopernetes coopernetes enabled auto-merge May 13, 2026 05:38
@coopernetes coopernetes merged commit 350d39d into main May 13, 2026
16 checks passed
@coopernetes coopernetes deleted the fix/tag-push-null-sha-diff branch May 13, 2026 05:39
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.

bug: tag pushes generate full repo diff from null SHA

1 participant