mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 09:44:59 +00:00
Added percentage contribution for each author to the blame report.
This commit is contained in:
parent
0153a18bff
commit
a619318dfe
1 changed files with 3 additions and 1 deletions
|
@ -66,8 +66,10 @@ def main():
|
|||
dump(all_file_counts)
|
||||
|
||||
print("\nGrand Total:")
|
||||
total_lines = sum(grand_total.values())
|
||||
for author, count in sorted(grand_total.items(), key=itemgetter(1), reverse=True):
|
||||
print(f"{author}: {count}")
|
||||
percentage = (count / total_lines) * 100
|
||||
print(f"{author}: {count} lines ({percentage:.2f}%)")
|
||||
|
||||
def get_counts_for_file(tag, authors, fname):
|
||||
text = run(['git', 'blame', f'{tag}..HEAD', '--', fname])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue