Skip to content
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

[submodules] Design on-disk format for Git submodules #1403

Closed
chooglen opened this issue Mar 20, 2023 · 2 comments
Closed

[submodules] Design on-disk format for Git submodules #1403

chooglen opened this issue Mar 20, 2023 · 2 comments

Comments

@chooglen
Copy link
Contributor

This should answer:

  • How submodule commits are stored.
  • Whether submodules should have jj repo features (a commit index, operation log)
  • How submodules will be represented in the working copy.

Some requirements to consider are:

@martinvonz
Copy link
Member

  • How submodule commits are stored.
  • Whether submodules should have jj repo features (a commit index, operation log)

I suspect it will be easiest to store them as full jj repos somewhere inside the top-level .jj/repo/ directory.

  • How submodules will be represented in the working copy.

I would start by storing them in the working copy as regular directories (maybe with a .git/ if we want to help the co-located case) and recorded in the working-copy state file as a new variant. Oh, we already have a variant for GitSubmodule, but we'd might need to extend that with some metadata. The idea is that we'd look at that when snapshotting the directory and we propagate it up to the superproject as a commit instead of a tree as we normally would for a regular directory.

  • How to fetch/push submodules from/to remotes.

My current feeling is that something like jj --submodule path/to/submodule git push should work.

@chooglen
Copy link
Contributor Author

Closed by #1482

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants