#Dependency on sub-directory of git repo

1 messages · Page 1 of 1 (latest)

torn shell
#

There is a C git repository that I would like to add as a dependency, but I only need a specific sub-directory of it. Is there a way to add the sub-directory as a dependency instead of the whole repo?

github.com/user/c-codebase
/
|- some-code/
|- more-code/
|- code-i-want/ # <- This is the library I need
|- even-more-code/

Example pseudo-command:

zig fetch git+https://github.com/user/codebase?path=code-i-want
vocal pelican
#

There might be a better answer, but just to get you going for now, One option is to checkout the whole repo, but tell build.zig to only point to the sub folder inside.

torn shell