Skip to content

Conversation

mthurman
Copy link

@mthurman mthurman commented Jan 4, 2022

I was running essentially git-history file data/pipelines.db data/pipelines.json and getting empty databases. Iterating over commit.tree.blobs only looks for files in the top level directory. Since my data was nested, I needed to iterate over commit.tree.trees also. According to some experimentation and the python-git docs, this path-like syntax should work for deeply nested files.

I was running essentially `git-history file data/pipelines.db data/pipelines.json` and getting empty databases. Iterating over `commit.tree.blobs` only looks for files in the top level directory. Since my data was nested, I needed to iterate over `commit.tree.trees` also. According to some experimentation and the python-git docs, this path-like syntax should work for deeply nested files.
@scoates
Copy link

scoates commented Jan 6, 2022

FWIW, the main part of this change is also present in #52 (though your KeyError vs IndexError is probably correct, too). Heads up when merging.

@mthurman
Copy link
Author

Ah cool; I'm happy to close this in favor of #52 then. Whichever one you want to merge! Let me know if you'd like to see any changes to get this one merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants