mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
Updated get_lines_with_commit_hash to set verbose parameter to False, added show_commit_stats function, and called show_commit_stats in process_fnames.
This commit is contained in:
parent
26210cfe6b
commit
a4694511a0
1 changed files with 10 additions and 3 deletions
|
@ -8,7 +8,7 @@ import pylab as plt
|
|||
from aider.dump import dump
|
||||
from imgcat import imgcat
|
||||
|
||||
def get_lines_with_commit_hash(filename, aider_commits, git_dname, verbose=True):
|
||||
def get_lines_with_commit_hash(filename, aider_commits, git_dname, verbose=False):
|
||||
result = subprocess.run(
|
||||
["git", "-C", git_dname, "blame", "-l", filename],
|
||||
capture_output=True,
|
||||
|
@ -58,15 +58,23 @@ def get_aider_commits(git_dname):
|
|||
commits.add(commit_hash)
|
||||
|
||||
dump(len(commits))
|
||||
|
||||
|
||||
return commits
|
||||
|
||||
|
||||
def show_commit_stats(commits):
|
||||
# TODO: print out the number of lines added and deleted for each commit
|
||||
# report totals
|
||||
pass
|
||||
|
||||
def process_fnames(fnames, git_dname):
|
||||
if not git_dname:
|
||||
git_dname = "."
|
||||
|
||||
aider_commits = get_aider_commits(git_dname)
|
||||
show_commit_stats(aider_commits)
|
||||
|
||||
total_lines = 0
|
||||
total_aider_lines = 0
|
||||
|
||||
|
@ -159,8 +167,7 @@ def history():
|
|||
|
||||
|
||||
def main():
|
||||
#history()
|
||||
#return
|
||||
#return history()
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
return process_repo()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue