mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
feat: add git blame move/copy detection for better attribution
This commit is contained in:
parent
5705bda818
commit
efa83bdf34
1 changed files with 2 additions and 2 deletions
|
@ -203,9 +203,9 @@ def main():
|
||||||
def get_counts_for_file(start_tag, end_tag, authors, fname):
|
def get_counts_for_file(start_tag, end_tag, authors, fname):
|
||||||
try:
|
try:
|
||||||
if end_tag:
|
if end_tag:
|
||||||
text = run(["git", "blame", f"{start_tag}..{end_tag}", "--", fname])
|
text = run(["git", "blame", "-M", "-C", "-C", "--abbrev=9", f"{start_tag}..{end_tag}", "--", fname])
|
||||||
else:
|
else:
|
||||||
text = run(["git", "blame", f"{start_tag}..HEAD", "--", fname])
|
text = run(["git", "blame", "-M", "-C", "-C", "--abbrev=9", f"{start_tag}..HEAD", "--", fname])
|
||||||
if not text:
|
if not text:
|
||||||
return None
|
return None
|
||||||
text = text.splitlines()
|
text = text.splitlines()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue