forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.Someone is actively working on this. Should link to a PR soon.bugSomething isn't workingSomething isn't working
Description
Problem (one or two sentences)
By default, git init uses whatever is configured in the user's $(git config --global init.templateDir). This may include hooks that the shadow git should not be triggering.
Context (who is affected and when)
Users of https://pre-commit.com/ that have updated their init.templatedir may see that the hooks they have defined are triggered on their workspace by commands on the shadow git.
There are others scenarios where side effects of using an unknow init.templatedir could have.
Reproduction steps
- Create and setup an
init.templatedirthat causes hooks to be triggered. This can be done with
1.1) Install pre-commit (brew install pre-commitin OSX)
1.2) Setup a gitint.templatedirand executepre-commit init-templatediron it - Create an empty project for Roo-Code and run
git init - Remove the
.git/hooks/pre-commitfile, so that the project does not have a pre-commit hook - Add a
.pre-commit-config.yamlto the project:
repos:
- repo: local
hooks:
- id: create-timestamp-file
name: Create timestamp file
entry: bash -c 'pwd > "$(date +%Y-%m-%d_%H-%M-%S).txt"'
language: system
pass_filenames: false
always_run: true
git add .pre-commit-config.yamlandgit commit -m "initial commit: nothing is triggered, as we removed the pre-commit hook- Perform any action that causes the the shadow git to be created and commited to
Expected result
The pre-commit hook is not triggered
Actual result
The pre-commit hook is triggered and we see its effects in the project (a new file with the time stamp)
Variations tried (optional)
No response
App Version
3.28.16
API Provider (optional)
None
Model Used (optional)
No response
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Metadata
Metadata
Assignees
Labels
Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.Someone is actively working on this. Should link to a PR soon.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Issue [In Progress]