MCPcopy
hub / github.com/Aider-AI/aider / GitRepo

Class GitRepo

aider/repo.py:52–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50
51
52class GitRepo:
53 repo = None
54 aider_ignore_file = None
55 aider_ignore_spec = None
56 aider_ignore_ts = 0
57 aider_ignore_last_check = 0
58 subtree_only = False
59 ignore_file_cache = {}
60 git_repo_error = None
61
62 def __init__(
63 self,
64 io,
65 fnames,
66 git_dname,
67 aider_ignore_file=None,
68 models=None,
69 attribute_author=True,
70 attribute_committer=True,
71 attribute_commit_message_author=False,
72 attribute_commit_message_committer=False,
73 commit_prompt=None,
74 subtree_only=False,
75 git_commit_verify=True,
76 attribute_co_authored_by=False, # Added parameter
77 ):
78 self.io = io
79 self.models = models
80
81 self.normalized_path = {}
82 self.tree_files = {}
83
84 self.attribute_author = attribute_author
85 self.attribute_committer = attribute_committer
86 self.attribute_commit_message_author = attribute_commit_message_author
87 self.attribute_commit_message_committer = attribute_commit_message_committer
88 self.attribute_co_authored_by = attribute_co_authored_by # Assign from parameter
89 self.commit_prompt = commit_prompt
90 self.subtree_only = subtree_only
91 self.git_commit_verify = git_commit_verify
92 self.ignore_file_cache = {}
93
94 if git_dname:
95 check_fnames = [git_dname]
96 elif fnames:
97 check_fnames = fnames
98 else:
99 check_fnames = ["."]
100
101 repo_paths = []
102 for fname in check_fnames:
103 fname = Path(fname)
104 fname = fname.resolve()
105
106 if not fname.exists() and fname.parent.exists():
107 fname = fname.parent
108
109 try:

Calls

no outgoing calls