Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the database file to live in a nested subdirectory #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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.

@hwartig hwartig mentioned this pull request Dec 2, 2022
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.

None yet

2 participants