Add more logging to updates
This commit is contained in:
parent
7e1f0735f4
commit
97928d1b86
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,7 @@ def get_all_commands(module: ModuleType = jarvis.cogs) -> Dict[str, Callable]:
|
|||
|
||||
def get_git_changes(repo: git.Repo) -> dict:
|
||||
"""Get all Git changes"""
|
||||
logger.debug("Getting all git changes")
|
||||
head = repo.head
|
||||
current_hash = head.object.hexsha
|
||||
tracking = head.tracking_branch()
|
||||
|
@ -73,6 +74,7 @@ def get_git_changes(repo: git.Repo) -> dict:
|
|||
file_changes[file] = {"insertions": 0, "deletions": 0, "lines": 0}
|
||||
for k, v in stats.items():
|
||||
file_changes[file][k] += v
|
||||
logger.debug(f"Found {len(file_changes)} changed files")
|
||||
|
||||
table = Table(title="File Changes")
|
||||
|
||||
|
@ -94,6 +96,7 @@ def get_git_changes(repo: git.Repo) -> dict:
|
|||
str(stats["deletions"]),
|
||||
str(stats["lines"]),
|
||||
)
|
||||
logger.debug(f"{i_total} insertions, {d_total} deletions, {l_total} total")
|
||||
|
||||
table.add_row("Total", str(i_total), str(d_total), str(l_total))
|
||||
return {
|
||||
|
|
Loading…
Add table
Reference in a new issue