download-directory / download-directory.github.io

Web App: Download just a sub directory from a GitHub repo.
https://download-directory.github.io
MIT License
1.25k stars 117 forks source link

"No files to download" on large repos #41

Closed glzlaohuai closed 1 year ago

glzlaohuai commented 3 years ago

Download using this link: https://github.com/phracker/MacOSX-SDKs/tree/master/MacOSX10.14.sdk

It prompts: No files to download

fregante commented 3 years ago

Yeah this is a limit unfortunately of the API, the repo is huge so the list is truncated:

https://github.com/fregante/list-github-dir-content/blob/f845e4e3fe5d6898cc359a21530e2f88f19c305c/index.js#L54

In this specific case, the repo also contains submodules which are definitely not supported and are unlikely to ever be. You should probably just use git

glzlaohuai commented 3 years ago

Thanks for the clarification.

fregante commented 3 years ago

I think however we could show a better error message at least, like "The repo is too big, nothing found"

mattalxndr commented 3 years ago

It's a shame that it's the large repos that are affected, because I'm not sure I'd use this feature otherwise. I'd probably just clone.

kidonng commented 3 years ago

@mattalexx that's probably the best solution. @fregante Maybe the website can provide commands to do a sparse checkout that is approximately equivalent to download the requested directory.