mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 22:34:59 +00:00
feat: Add --git-commit-verify flag to control git hook verification
This commit is contained in:
parent
aca64071c8
commit
ac231e43ad
3 changed files with 12 additions and 1 deletions
|
@ -56,6 +56,7 @@ class GitRepo:
|
|||
attribute_commit_message_committer=False,
|
||||
commit_prompt=None,
|
||||
subtree_only=False,
|
||||
git_commit_verify=True,
|
||||
):
|
||||
self.io = io
|
||||
self.models = models
|
||||
|
@ -69,6 +70,7 @@ class GitRepo:
|
|||
self.attribute_commit_message_committer = attribute_commit_message_committer
|
||||
self.commit_prompt = commit_prompt
|
||||
self.subtree_only = subtree_only
|
||||
self.git_commit_verify = git_commit_verify
|
||||
self.ignore_file_cache = {}
|
||||
|
||||
if git_dname:
|
||||
|
@ -133,7 +135,9 @@ class GitRepo:
|
|||
# if context:
|
||||
# full_commit_message += "\n\n# Aider chat conversation:\n\n" + context
|
||||
|
||||
cmd = ["-m", full_commit_message, "--no-verify"]
|
||||
cmd = ["-m", full_commit_message]
|
||||
if not self.git_commit_verify:
|
||||
cmd.append("--no-verify")
|
||||
if fnames:
|
||||
fnames = [str(self.abs_root_path(fn)) for fn in fnames]
|
||||
for fname in fnames:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue