Skip to content

Commit 607f5dd

Browse files
committed
adding logging to expand to debug git failure
1 parent a5dbcad commit 607f5dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

expand.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def versions(path, count, branch='origin/main', repo=None):
2323
file diff information to show a timeseries of file changes.
2424
"""
2525

26+
print(f"versions: path: {path}, count: {count}, branch: {branch}, repo: {repo}")
2627

2728
# Iterate through the first N commits for the given branch in the repository
2829
# all indications are that they are in reverse chronological order by default
@@ -32,6 +33,7 @@ def versions(path, count, branch='origin/main', repo=None):
3233
# If no parent, this is the first commit, so use empty tree.
3334
# Then create a mapping of path to diff for each file changed.
3435
parent = commit.parents[0] if commit.parents else EMPTY_TREE_SHA
36+
print(f"version: commit: {commit}, parent: {parent}")
3537
diffs = {
3638
diff.a_path: diff for diff in commit.diff(parent)
3739
}

0 commit comments

Comments
 (0)