Repository navigation
Allow blob get of deep tree data - #8
Conversation
|
@lyuzashi Ah yeah nice - I was really struggling with the github docs on getTree, they're pretty sparse, and I couldn't figure out what the recursive option actually did, but it looks like without it it doesn't actually traverse sub-dirs. What's frustrating is
Would be worth adding a comment in the code about that maximum limit and that we don't handle it if you don't mind. Otherwise LGTM! |
|
PS - I only skimmed your comment when I wrote mine - looks like you already knew about the truncate stuff haha. LMK if you don't mind adding that comment |
|
@lyuzashi I decided to just add the comment and publish 👍 Thanks for all the PR's! |
|
Thanks @alex-e-leon! I was starting to look at a custom error for the case when truncated is true and the specific path is not found but that’s probably overkill. Thanks for releasing so quick, this will keep me out of trouble :D |
|
yeah - I figure we can write that code if when someone who uses this runs into the problem - I dont even know how big your tree needs to be before that's an issue - no point writing code for something that may never come up! |
Hi @alex-e-leon! I had a chance to try out the getTree solution on a real-world repo and encountered a little issue.
Turns out by default
getTreeonly returns a shallow tree, and the large file I was attempting to include in the diff is buried a few directories deep.Easy fix (so long as this doesn't run into the "maximum limit" and get truncated) using the recursive option.