git-history icon indicating copy to clipboard operation
git-history copied to clipboard

Allow the database file to live in a nested subdirectory

Open mthurman opened this issue 2 years ago • 2 comments

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.

mthurman avatar Jan 04 '22 23:01 mthurman

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.

scoates avatar Jan 06 '22 15:01 scoates

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.

mthurman avatar Jan 11 '22 20:01 mthurman