Skip to content

git submodule support #206

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

Open
jmberg opened this issue Dec 11, 2020 · 3 comments
Open

git submodule support #206

jmberg opened this issue Dec 11, 2020 · 3 comments
Labels
indexing Related to the index content — missing definitions/references, lexer bugs, new ctags features...

Comments

@jmberg
Copy link

jmberg commented Dec 11, 2020

For a project that I'm considering using elixir for, submodule support would be rather necessary.

Again, not sure how it can be done, but leaving it here in case somebody has ideas.

@cxw42
Copy link
Contributor

cxw42 commented Dec 11, 2020

That can probably be done in script.sh, if I had to guess. If script.sh tells update.py that a repo contains certain trees/blobs, update.py won't know any different.

@jmberg
Copy link
Author

jmberg commented Dec 11, 2020

Hmm, yes, I think that's true. Will probably require overwriting quite a bit of stuff, get_type(), get_blob(), get_file(), get_dir(); and of course list_blobs() ...

Actually much more, but I guess things like tokenize_file(), parse_defs_*() and parse_docs() really could use get_blob() instead of open-coding git cat-file blob.

@tleb
Copy link
Member

tleb commented Feb 25, 2025

Someone related to the draft of #394. Zephyr does not use submodules but instead requires running a magical west command that pulls additional source code into the directory.

We are extending Elixir to let each project replace git fetch by its more complex behavior. Those steps will be responsible for generating tags that only contain Git blobs. Zephyr will be this pseudocode:

git fetch --tags
west ...
git commit -a ...
git tag resolved-...

Why do it that way? Because all the Elixir code assumes a Git repo is a list of blobs tied to filepaths. Supporting submodules would introduce too much complexity. It is much more straight-forward to generate a fake Git repo that only contains blobs.

@tleb tleb added the indexing Related to the index content — missing definitions/references, lexer bugs, new ctags features... label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
indexing Related to the index content — missing definitions/references, lexer bugs, new ctags features...
Projects
None yet
Development

No branches or pull requests

3 participants