Skip to content

Remove git signature from generated patches#629

Open
opohorel wants to merge 1 commit into
packit:mainfrom
opohorel:no_signature
Open

Remove git signature from generated patches#629
opohorel wants to merge 1 commit into
packit:mainfrom
opohorel:no_signature

Conversation

@opohorel

Copy link
Copy Markdown
Collaborator
image

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the backport documentation, prompt templates, and the wicked_git.py tool to include the --no-signature flag when running git format-patch. This ensures that generated patch files do not contain the Git version signature, leading to cleaner and more consistent patch outputs. There are no review comments provided, so I have no additional feedback to offer.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@qodo-for-packit

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

Sorry, something went wrong

We weren't able to complete the code review on our side. Please try again

Grey Divider

Qodo Logo

@qodo-for-packit

Copy link
Copy Markdown

PR Summary by Qodo

Omit git format-patch signatures in generated backport patches
🐞 Bug fix 📝 Documentation 🕐 10-20 Minutes

Grey Divider

Description

• Ensure generated patch files exclude Git’s trailing signature block.
• Update backport workflow docs/prompts to recommend git format-patch --no-signature.
• Make git_patch_create invoke git format-patch with --no-signature by default.
Diagram

graph TD
  A["Backport docs & prompts"] --> B["git_patch_create tool"] --> D["git format-patch --no-signature"] --> E([".patch output"])
  A --> C["run_shell_command"] --> D
Loading
High-Level Assessment

Using git format-patch --no-signature is the most direct and deterministic way to prevent signature trailers from entering generated patches. Alternatives like post-processing patch text or relying on per-user git config (e.g., format.signature) are more fragile and environment-dependent.

Files changed (4) +9 / -9

Bug fix (1) +1 / -1
wicked_git.pyAdd '--no-signature' to 'git_patch_create'’s format-patch invocation +1/-1

Add '--no-signature' to 'git_patch_create'’s format-patch invocation

• Changes 'GitPatchCreationTool' to call 'git format-patch' with '--no-signature' when producing the combined patch output. This prevents git’s signature footer from being included in generated patches.

ymir/tools/unprivileged/wicked_git.py

Documentation (3) +8 / -8
SKILL.mdDocument '--no-signature' for per-commit patch generation +4/-4

Document '--no-signature' for per-commit patch generation

• Updates backport instructions to include 'git format-patch --no-signature' in the recommended 'run_shell_command' examples. This aligns documentation with the desired patch artifact format (no git signature trailer).

agents_as_skills/backport/SKILL.md

instructions.j2Align backport prompt instructions to use '--no-signature' +2/-2

Align backport prompt instructions to use '--no-signature'

• Updates the backport agent prompt template to recommend 'git format-patch --no-signature' for multi-patch workflows. Keeps generated guidance consistent with the tool behavior change.

ymir/agents/prompts/backport/instructions.j2

instructions_zstream.j2Align z-stream backport prompt instructions to use '--no-signature' +2/-2

Align z-stream backport prompt instructions to use '--no-signature'

• Updates the z-stream backport prompt template to recommend 'git format-patch --no-signature' for per-commit patch generation. Mirrors the non-z-stream backport prompt changes for consistency.

ymir/agents/prompts/backport/instructions_zstream.j2

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