forked from cline/cline
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Issue/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.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.templatedir
that causes hooks to be triggered. This can be done with
1.1) Install pre-commit (brew install pre-commit
in OSX)
1.2) Setup a gitint.templatedir
and executepre-commit init-templatedir
on it - Create an empty project for Roo-Code and run
git init
- Remove the
.git/hooks/pre-commit
file, so that the project does not have a pre-commit hook - Add a
.pre-commit-config.yaml
to 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.yaml
andgit 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/PR - TriageNew issue. Needs quick review to confirm validity and assign labels.New issue. Needs quick review to confirm validity and assign labels.bugSomething isn't workingSomething isn't working
Type
Projects
Status
Triage