Skip to content

Conversation

@xverges
Copy link

@xverges xverges commented Oct 12, 2025

Related GitHub Issue

Closes: #8629

Description

git init without options can use templates that trigger commit hooks.
This patch forces ShadowCheckpointService to use git init --template=
instead of just git init.

Test Procedure

#8629 defines the steps to recreate the bug. With the patch, the bug does not happen.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

Get in Touch

@x_verges


Important

Modify ShadowCheckpointService to use git init --template="" to prevent template-triggered commit hooks.

This description was created by Ellipsis for 203549f. You can customize this summary. It will automatically update as commits are pushed.

@xverges xverges requested review from cte, jr and mrubens as code owners October 12, 2025 17:07
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Oct 12, 2025
} else {
this.log(`[${this.constructor.name}#initShadowGit] creating shadow git repo at ${this.checkpointsDir}`)
await git.init()
await git.init({ "--template": "" })
Copy link

Choose a reason for hiding this comment

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

Using git.init({ "--template": "" }) correctly prevents git from applying any default templates (and hence commit hooks) during repo initialization. Please add a brief inline comment referencing bug #8628 so future maintainers understand the rationale behind this change.

Suggested change
await git.init({ "--template": "" })
await git.init({ "--template": "" }) // Prevents default templates/hooks, see bug #8628

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 12, 2025
@xverges
Copy link
Author

xverges commented Oct 12, 2025

#8629 is better. Closing.

@xverges xverges closed this Oct 12, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 12, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants